Skip to content

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

@mikolajkucinski

Description

@mikolajkucinski

Priority

(Low) Nice to have

User Story

As a core team developer I want e2e tests covering TeamRoleBindings with multiple teamRefs.

Description

This issue is a follow-up to the PR. Possible scenarios

  • Single teamRef (baseline): Create a TRB with one team -> verify ClusterRoleBinding on the remote cluster has the correct subjects
  • Multiple teamRefs: Create a TRB with 2+ teams → verify ClusterRoleBinding subjects include members from all referenced teams
  • Deprecated teamRef migration: Create a TRB using the old singular teamRef field -> verify the webhook merges it into teamRefs and RBAC is applied correctly
  • Mutation of teamRefs: Update a TRB to add/remove a team from teamRefs -> verify ClusterRoleBinding subjects are updated on the remote cluster
  • Partial failure (missing team): Create a TRB referencing a non-existent team alongside a valid one -> verify RBAC is still applied for the valid team and the status reflects the error
  • Namespace creation: TRB with createNamespaces: true and multiple teams -> verify namespaces are created and RoleBindings are correct in each
  • Cluster selector: TRB with a cluster selector -> verify RBAC is only applied to matching remote clusters

Acceptance Criteria

  • All test scenarios are covered

Reference Issues

#1781

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions