feat(e2e): e2e tests for multiple team refs in TRB#1927
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a dedicated TeamRoleBinding E2E suite to validate behavior around the new teamRefs field (including migration from deprecated teamRef) and related reconciliation scenarios.
Changes:
- Introduces a new
teamrolebindingE2EGinkgo suite that onboards a remote cluster, creates shared Team/TeamRole fixtures, and runs scenario entries. - Adds scenario implementations covering single/multiple
teamRefs, deprecatedteamRefmigration, teamRefs mutation, partial failure, namespace creation, and cluster selector behavior. - Adds a TeamRoleBinding-specific Organization manifest used for E2E environment setup.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| e2e/teamrolebinding/e2e_test.go | New E2E suite wiring + ordered scenario execution via DescribeTable |
| e2e/teamrolebinding/scenarios/scenario.go | Scenario runner interface + shared helpers (create/cleanup) |
| e2e/teamrolebinding/scenarios/trb_single_team.go | Baseline single-teamRefs subject + status assertions |
| e2e/teamrolebinding/scenarios/trb_multi_teams.go | Multiple-teamRefs subject aggregation assertions |
| e2e/teamrolebinding/scenarios/trb_deprecated_migration.go | Verifies webhook migration from deprecated teamRef to teamRefs |
| e2e/teamrolebinding/scenarios/trb_mutation.go | Verifies subject updates after adding/removing teams in teamRefs |
| e2e/teamrolebinding/scenarios/trb_partial_failure.go | Verifies behavior with missing teams (partial and total failure) |
| e2e/teamrolebinding/scenarios/trb_namespace_creation.go | Verifies createNamespaces=true creates RoleBindings in created namespaces |
| e2e/teamrolebinding/scenarios/trb_cluster_selector.go | Verifies label selector scoping and cleanup when labels no longer match |
| e2e/teamrolebinding/testdata/organization.yaml | Test Organization manifest for the new E2E suite |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
…ace creation TRB scenario On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
…ailure case On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
92f0cee to
c6502bc
Compare
Description
This PR adds E2E tests for multiple team refs introduced to TeamRoleBindings. Test scenarios are kept in separate files.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Added tests?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Added to documentation?
Checklist