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

Introduce a file for assertions #424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rhmdnd
Copy link

@rhmdnd rhmdnd commented Sep 28, 2023

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.

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.
@openshift-ci
Copy link

openshift-ci bot commented Sep 28, 2023

[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

@rhmdnd rhmdnd requested review from yuumasato and Vincent056 and removed request for jhrozek September 28, 2023 14:46
Copy link

openshift-ci bot commented Jul 19, 2024

@rhmdnd: The following tests 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-serial 4fee621 link true /test e2e-aws-serial
ci/prow/e2e-rosa 4fee621 link true /test e2e-rosa
ci/prow/e2e-aws-parallel 4fee621 link true /test e2e-aws-parallel

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant