k8wiz
Kyverno
Hard
Testing

A CI job runs kyverno test policies/ but a directory rename means no kyverno-test.yaml files are found. Which flag makes the job fail instead of passing?

Select your answer:

Show answer and explanation

Answer: --require-tests

Explanation

When no test files are found, kyverno test prints "No test yamls available" and still exits successfully, so the CI job passes without testing anything. --require-tests turns that case into an error. --fail-only only limits the output to failing tests.

Read more about Kyverno