compliance-operator icon indicating copy to clipboard operation
compliance-operator copied to clipboard

Introduce a file for assertions

Open rhmdnd opened this issue 2 years ago • 3 comments

We have a smattering of assertions in different files within the framework package. Even if you rely on your IDE to fill these in for you, organizing them is good practice.

This commit adds a new file specifically for assertions, and populates it with an existing assertion used in tests.

It also implements the ability for assertions to handle test outcomes, instead of returning booleans, forcing the callers to handle test outcomes. Although having test outcomes (e.g., FailNow) in the test is clear, we check and call Fatal a lot across the test code. Moving the outcome into the assertion allows the code to be a little more dry, and clear if everyone agrees assertions should accept that reponsibility.

rhmdnd avatar Sep 28 '23 14:09 rhmdnd

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Sep 28 '23 14:09 openshift-ci[bot]

:robot: To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:424-5b3087517a02ed13510ec9b2b2b0aaf0e05f72da

github-actions[bot] avatar Jan 07 '25 17:01 github-actions[bot]

@rhmdnd: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-parallel-arm 5b3087517a02ed13510ec9b2b2b0aaf0e05f72da link true /test e2e-aws-parallel-arm

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Mar 01 '25 01:03 openshift-ci[bot]