Skip to content

feat(e2e): e2e tests for multiple team refs in TRB#1927

Merged
Zaggy21 merged 7 commits into
mainfrom
feat/e2e-tests-for-multiple-team-refs-in-trb
May 7, 2026
Merged

feat(e2e): e2e tests for multiple team refs in TRB#1927
Zaggy21 merged 7 commits into
mainfrom
feat/e2e-tests-for-multiple-team-refs-in-trb

Conversation

@Zaggy21
Copy link
Copy Markdown
Contributor

@Zaggy21 Zaggy21 commented Apr 14, 2026

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)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

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?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@Zaggy21 Zaggy21 requested a review from a team as a code owner April 14, 2026 14:32
@Zaggy21 Zaggy21 linked an issue Apr 14, 2026 that may be closed by this pull request
1 task
Comment thread e2e/teamrolebinding/scenarios/trb_namespace_creation.go Outdated
Comment thread e2e/teamrolebinding/scenarios/trb_multi_teams.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 teamrolebindingE2E Ginkgo suite that onboards a remote cluster, creates shared Team/TeamRole fixtures, and runs scenario entries.
  • Adds scenario implementations covering single/multiple teamRefs, deprecated teamRef migration, 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.

Comment thread e2e/teamrolebinding/scenarios/scenario.go Outdated
Comment thread e2e/teamrolebinding/scenarios/trb_cluster_selector.go
Comment thread e2e/teamrolebinding/scenarios/trb_namespace_creation.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread e2e/teamrolebinding/scenarios/trb_namespace_creation.go Outdated
Comment thread e2e/teamrolebinding/scenarios/scenario.go
Comment thread e2e/teamrolebinding/scenarios/trb_partial_failure.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread e2e/teamrolebinding/scenarios/trb_partial_failure.go Outdated
Comment thread e2e/teamrolebinding/e2e_test.go
Zaggy21 added 7 commits May 7, 2026 14:39
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>
@Zaggy21 Zaggy21 force-pushed the feat/e2e-tests-for-multiple-team-refs-in-trb branch from 92f0cee to c6502bc Compare May 7, 2026 12:40
@Zaggy21 Zaggy21 merged commit 5737ad6 into main May 7, 2026
21 checks passed
@Zaggy21 Zaggy21 deleted the feat/e2e-tests-for-multiple-team-refs-in-trb branch May 7, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] - E2E tests for multiple team refs in TRB

4 participants