mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-13 19:28:55 +00:00
chore: small nits in cli test command (#9573)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
81c70c8b85
commit
13052267d0
2 changed files with 5 additions and 10 deletions
|
@ -122,17 +122,11 @@ func testCommandExecute(
|
|||
}
|
||||
fmt.Fprintln(out, " Checking results ...")
|
||||
var resultsTable table.Table
|
||||
{
|
||||
err := printTestResult(out, filteredResults, responses, rc, &resultsTable, test.Fs, resourcePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to print test result (%w)", err)
|
||||
}
|
||||
if err := printTestResult(out, filteredResults, responses, rc, &resultsTable, test.Fs, resourcePath); err != nil {
|
||||
return fmt.Errorf("failed to print test result (%w)", err)
|
||||
}
|
||||
{
|
||||
err := printCheckResult(out, test.Test.Checks, responses, rc, &resultsTable)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to print test result (%w)", err)
|
||||
}
|
||||
if err := printCheckResult(out, test.Test.Checks, responses, rc, &resultsTable); err != nil {
|
||||
return fmt.Errorf("failed to print test result (%w)", err)
|
||||
}
|
||||
fullTable.AddFailed(resultsTable.RawRows...)
|
||||
printer := table.NewTablePrinter(out)
|
||||
|
|
|
@ -90,6 +90,7 @@ func runTest(out io.Writer, testCase test.TestCase, registryAccess bool, auditWa
|
|||
if res.IsValidatingAdmissionPolicy {
|
||||
continue
|
||||
}
|
||||
// TODO: what if two policies have a rule with the same name ?
|
||||
if rule.Name == res.Rule {
|
||||
if rule.HasGenerate() {
|
||||
if len(rule.Generation.CloneList.Kinds) != 0 { // cloneList
|
||||
|
|
Loading…
Add table
Reference in a new issue