1
0
mirror of synced 2026-02-08 19:35:56 +00:00

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

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) {