mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
fix the result column for Kyverno test (#11842)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
This commit is contained in:
parent
d2e6759115
commit
782641d3ff
1 changed files with 12 additions and 0 deletions
|
@ -244,6 +244,18 @@ func printTestResult(
|
|||
for _, rule := range lookupRuleResponses(test, response.PolicyResponse.Rules...) {
|
||||
r := response.Resource
|
||||
|
||||
if test.IsValidatingAdmissionPolicy {
|
||||
ok, message, reason := checkResult(test, fs, resoucePath, response, rule, r)
|
||||
if strings.Contains(message, "not found in manifest") {
|
||||
resourceSkipped = true
|
||||
continue
|
||||
}
|
||||
|
||||
resourceRows := createRowsAccordingToResults(test, rc, &testCount, ok, message, reason, strings.Replace(resource, ",", "/", -1))
|
||||
rows = append(rows, resourceRows...)
|
||||
continue
|
||||
}
|
||||
|
||||
if rule.RuleType() != "Generation" {
|
||||
if rule.RuleType() == "Mutation" {
|
||||
r = response.PatchedResource
|
||||
|
|
Loading…
Add table
Reference in a new issue