Introduce a file for assertions
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.
[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
- ~~OWNERS~~ [rhmdnd]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
:robot: To deploy this PR, run the following command:
make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:424-5b3087517a02ed13510ec9b2b2b0aaf0e05f72da
@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.