Skip to content
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

refac(teamrbac): introduce helpers for testing #237

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Conversation

IvoGoman
Copy link
Contributor

This PR brings in test.TestSetup(..) which provides some convenience around creating resources in dedicated namespace. Together with helper methods to create resources (e.g. CreateTeamRoleBinding(..) or OnboardCluster(..) this should help to reduce the manifest boilerplate required to create resources during test setups.

The test restructuring also unveiled missing propagation of errors when the reconciliation failed. They are now returned.

Copy link
Contributor

@kengou kengou left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@uwe-mayer uwe-mayer left a comment

Choose a reason for hiding this comment

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

lgtm, some comments

pkg/test/resources.go Show resolved Hide resolved
pkg/test/resources.go Show resolved Hide resolved
Co-authored-by: Uwe Mayer <115539431+uwe-mayer@users.noreply.github.com>
@IvoGoman IvoGoman merged commit 11ca0fc into main Jun 6, 2024
5 checks passed
@IvoGoman IvoGoman deleted the refac/testsetup branch June 6, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants