mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
Make sure failed tests report their exit code (#240)
Commit 72c1660c13cb8cf0d590d91fb03625a68e53900f introduced TestMain, but forgot to call os.Exit with the value returned from m.Run This causes "go test" to exit with status 0, even if tests fail. Adding os.Exit to TestMain makes sure the success/failure of tests is correctly reported through the exit code.
This commit is contained in:
parent
8e7d6335c9
commit
126f21b002
@ -34,7 +34,7 @@ func TestMain(m *testing.M) {
|
||||
fmt.Fprintln(os.Stderr, "seed:", qseed)
|
||||
fmt.Fprintf(os.Stderr, "quick settings: count=%v, items=%v, ksize=%v, vsize=%v\n", qcount, qmaxitems, qmaxksize, qmaxvsize)
|
||||
|
||||
m.Run()
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func qconfig() *quick.Config {
|
||||
|
Loading…
x
Reference in New Issue
Block a user