Merge pull request #1688 from allenporter/flux-test-main

Replace init() with TestMain()
This commit is contained in:
Hidde Beydals 2021-08-05 18:46:56 +02:00 committed by GitHub
commit daeef98dfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,9 +17,10 @@ import (
fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
)
func init() {
func TestMain(m *testing.M) {
// Ensure tests print consistent timestamps regardless of timezone
os.Setenv("TZ", "UTC")
os.Exit(m.Run())
}
func readYamlObjects(objectFile string) ([]client.Object, error) {