-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/8.0] [tests] EndToEnd - add test scenarios (#3113) #3377
Conversation
Test scenarios allow defining different groupings for tests to be run. This is useful for CI to run the tests in separate helix items. ```csharp TestResourceNames resourcesToInclude = TestScenario switch { "oracle" => TestResourceNames.oracledatabase, "cosmos" => TestResourceNames.cosmos, "scenario0" => TestResourceNames.kafka | TestResourceNames.mongodb | TestResourceNames.rabbitmq | TestResourceNames.redis | TestResourceNames.postgres | TestResourceNames.efnpgsql | TestResourceNames.mysql | TestResourceNames.efmysql | TestResourceNames.sqlserver, "" or null => TestResourceNames.All, _ => throw new ArgumentException($"Unknown test scenario '{TestScenario}'") }; ``` Once `eforacle` is added it can run with the `oracle` scenario. The default is to run all the tests. Also: - Enable `cosmos` E2E tests on helix - make `TestResourceNames` into a `[Flag]` enum so multiple can be expressed at the same time. - And support dumping docker container logs for resources where the resource name does not match the container name prefix. For example `efnpgsql` vs `postgres`.
Test failure is unrelated - #3380 . |
Don't merge on RED though as this was a non-helix test failure, thus the helix tests never ran. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
public async Task DumpComponentLogsAsync(TestResourceNames resource, ITestOutputHelper? testOutputArg = null) | ||
{ | ||
string component = resource switch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not for this PR, but we can fix it in main) -
This is kind of weird now that TestResourceNames
is a flags enum. If you pass in a value with multiple resources set, it will throw with "unknown resource: {resource}". Maybe the error message could be better saying only single resource names are supported?
@joperezr could you please merge this? I don't have permissions for it. |
Backport of #3113 into release/8.0
Original Description:
Test scenarios allow defining different groupings for tests to be run. This is useful for CI to run the tests in separate helix items.
Once
eforacle
is added it can run with theoracle
scenario.The default is to run all the tests.
Also:
cosmos
E2E tests on helixTestResourceNames
into a[Flag]
enum so multiple can be expressed at the same time.efnpgsql
vspostgres
.Microsoft Reviewers: Open in CodeFlow