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

Allow informative tests to produce skipped result #1292

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions policy/release/test/test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ deny contains result if {
#
deny contains result if {
some test in _resulted_in(lib.rule_data("skipped_tests_results"), "n/a")

# Workaround/hack: Don't produce a violation for informative_tests that were
# skipped Motivation: For operator bundles, the ecosystem-cert-preflight-checks
# task intentionally produces a "skipped" result if it things that the image is
# an operator bundle. Since we know ecosystem-cert-preflight-checks is in the
# informative_tests list, we can do this to side-step a violation.
not test in lib.rule_data("informative_tests")
result := lib.result_helper_with_term(rego.metadata.chain(), [test], test)
}

Expand Down
Loading