-
Notifications
You must be signed in to change notification settings - Fork 6.8k
test(e2e): add isolation by ensuring unique name #25724
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
Merged
Merged
+1,278
−1,324
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
crenshaw-dev
approved these changes
Jan 9, 2026
14 tasks
|
❌ Cherry-pick failed for 3.3. Please check the workflow logs for details. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test Isolation Infrastructure: Introduced a test isolation mechanism by generating unique identifiers for each e2e test that will be appended to the resource it creates, preventing conflicts between runs and move towards parallel test execution.
Key Components:
TestStatestruct: Holds the unique identifiers (id,shortId,name,deploymentNamespace) for each test instead of being defined as global package variableTestContextinterface: Standardized interface that all fixture contexts implement to access unique test identifiersRefactor Details
Before: Tests relied on shared global state and hardcoded names, causing conflicts when tests ran in parallel or when resources weren't properly cleaned up between runs. Sometimes, a test would start with existing objects in Terminating state making the test fail and behaviour unpredictable.
After: Each test creates a
TestStatewith unique identifiers throughEnsureCleanState(), which is embedded in all fixture contexts (app, cluster, account, project, repos, etc.). TheGivenWithSameState()pattern allows multiple fixture types to share the same test "state" within a single test. Resources created through the Actions have a unique name for the given state.Core Changes:
test/e2e/fixture/context.go: AddedTestContextinterface andTestStatestruct with unique ID generationTestStateand implementTestContextinterfaceGetName()which returns the unique test nameDeploymentNamespace()Tests Requiring Major Changes
TestClusterDelete(cluster_test.go:268-330)defaultTestArgoCDSupportsMultipleServiceAccountsWithDifferingRBACOnSameCluster(deployment_test.go:158-206)createNamespaceScopedUser()to usec.ShortID()for generating unique names for namespaces, service accounts, roles, and cluster secrets. The test labels were addwed so they are part of the usual cleanup in EnsureCleanState and the code that existed to clean them up has been removed since it was obsolete.Part of #24307