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

test(resources): multi-namespace support for test resources #507

Merged
merged 2 commits into from
Dec 9, 2022

Conversation

ebaron
Copy link
Member

@ebaron ebaron commented Dec 9, 2022

This PR is long, but a lot of the changes are a result of changing functions to methods. I've added a TestResources struct that is embedded into the cryostatTestInput used by the controller tests. Several fields have moved to the TestResources type where it makes sense: minimal, tls, etc. These would be fields that have some effect on the creation of the test objects. In addition to this, a new namespace field is added. Modifying this field affects the namespace of all subsequently created test objects.

By changing the test object creation from functions to methods, I've been able to reduce the parameter bloat, which hopefully results in more readable tests. I've tried quite a few iterations of this refactoring, before settling on this approach. Let me know what you think.

Fixes: #506

Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

Looks good to me :D

@ebaron ebaron merged commit 119a5f7 into cryostatio:main Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Tests must support multiple namespaces
3 participants