mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +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.Println()
|
||||
if rc.Fail > 0 && !failOnly {
|
||||
printFailedTestResult(table, compact)
|
||||
if rc.Fail > 0 {
|
||||
if !failOnly {
|
||||
printFailedTestResult(table, compact)
|
||||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
os.Exit(0)
|
||||
|
|
Loading…
Reference in a new issue