1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-29 10:55:05 +00:00

Fix test Summary printing for failure test cases (#3749)

* Test Summary printing for failure test cases

Signed-off-by: Prateeknandle <prateeknandle@gmail.com>

* shifted rc.fail block below print statement

Signed-off-by: Prateeknandle <prateeknandle@gmail.com>
This commit is contained in:
Prateek Nandle 2022-05-02 03:52:40 +05:30 committed by GitHub
parent dd0f6baa7d
commit d980a3b883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -440,12 +440,11 @@ func testCommandExecute(dirPath []string, fileName string, gitBranch string, tes
}
}
fmt.Printf("\nTest Summary: %d tests passed and %d tests failed\n", rc.Pass+rc.Skip, rc.Fail)
if rc.Fail > 0 {
os.Exit(1)
}
fmt.Printf("\nTest Summary: %d tests passed and %d tests failed\n", rc.Pass+rc.Skip, rc.Fail)
os.Exit(0)
return rc, nil
}