mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
fix: global anchor warning (#4962)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
parent
a89fbac333
commit
6270d40f50
2 changed files with 1 additions and 2 deletions
|
@ -10,7 +10,7 @@ func GetWarningMessages(engineResponses []*response.EngineResponse) []string {
|
|||
var warnings []string
|
||||
for _, er := range engineResponses {
|
||||
for _, rule := range er.PolicyResponse.Rules {
|
||||
if rule.Status != response.RuleStatusPass {
|
||||
if rule.Status != response.RuleStatusPass && rule.Status != response.RuleStatusSkip {
|
||||
msg := fmt.Sprintf("policy %s.%s: %s", er.Policy.GetName(), rule.Name, rule.Message)
|
||||
warnings = append(warnings, msg)
|
||||
}
|
||||
|
|
|
@ -92,7 +92,6 @@ func TestGetWarningMessages(t *testing.T) {
|
|||
"policy test.rule-warn: message warn",
|
||||
"policy test.rule-fail: message fail",
|
||||
"policy test.rule-error: message error",
|
||||
"policy test.rule-skip: message skip",
|
||||
},
|
||||
}}
|
||||
for _, tt := range tests {
|
||||
|
|
Loading…
Add table
Reference in a new issue