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.
More hard Kyverno questions
- What is the purpose of the 'context' field in a Kyverno policy?
- What is the purpose of the 'foreach' field in a Kyverno rule?
- Which of the following is NOT a component of the Kyverno architecture?
- What is the purpose of the 'kyverno.io/updateToken' annotation in a generated resource?
- Which of the following is NOT a valid source for context variables in Kyverno?
- What is the purpose of the 'kyverno.io/last-applied-policy' annotation?