1
0
Fork 0
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:
Mariam Fahmy 2025-01-16 17:29:30 +02:00 committed by GitHub
parent d2e6759115
commit 782641d3ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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