diff --git a/internal/beforemaintest/image_test.go b/internal/beforemaintest/image_test.go index f2ea4aba3..0e19df6c9 100644 --- a/internal/beforemaintest/image_test.go +++ b/internal/beforemaintest/image_test.go @@ -78,7 +78,9 @@ func TestMain(m *testing.M) { panic(err) } - os.Exit(<-codeCh) + if code := <-codeCh; code != 0 { + os.Exit(code) + } } type testResult struct {