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

runtime/conditions: Add HasAny() for conditions and WithT for checker #458

Merged
merged 2 commits into from
Feb 7, 2023

Conversation

darkowlzz
Copy link
Contributor

Use *gomega.WithT in condition checker to be able to assert and fail
like a proper go test and as a test helper instead of abrupt exit.
Also, show the full observed conditions when the conditions checker fails
to be able to evaluate the failure with full context.

Conditions HasAny() helps check if an object contains any of the given list of
conditons. This is needed in source-controller fluxcd/source-controller#1016.

@darkowlzz darkowlzz added the area/runtime Controller runtime related issues and pull requests label Feb 2, 2023
Use *gomega.WithT in condition checker to be able to assert and fail
like a proper go test and as a test helper instead of abrupt exit.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
HasAny() helps check if an object contains any of the given list of
conditons.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
@darkowlzz darkowlzz merged commit 119e06a into main Feb 7, 2023
@darkowlzz darkowlzz deleted the checker-with-t branch February 7, 2023 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime Controller runtime related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants