mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-16 20:48:42 +00:00
fix: make test --fail-only
return 1 if there are failed tests (#7717)
Signed-off-by: Carles Figuerola <cfiguerola@expediagroup.com> Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
6cb54a475c
commit
b77bcc2c13
1 changed files with 4 additions and 2 deletions
|
@ -167,8 +167,10 @@ func testCommandExecute(
|
||||||
fmt.Printf("\nTest Summary: %d out of %d tests failed\n", rc.Fail, rc.Pass+rc.Skip+rc.Fail)
|
fmt.Printf("\nTest Summary: %d out of %d tests failed\n", rc.Fail, rc.Pass+rc.Skip+rc.Fail)
|
||||||
}
|
}
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
if rc.Fail > 0 && !failOnly {
|
if rc.Fail > 0 {
|
||||||
|
if !failOnly {
|
||||||
printFailedTestResult(table, compact)
|
printFailedTestResult(table, compact)
|
||||||
|
}
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue