Merge pull request #1688 from allenporter/flux-test-main
Replace init() with TestMain()
This commit is contained in:
@@ -17,9 +17,10 @@ import (
|
|||||||
fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
|
fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func TestMain(m *testing.M) {
|
||||||
// Ensure tests print consistent timestamps regardless of timezone
|
// Ensure tests print consistent timestamps regardless of timezone
|
||||||
os.Setenv("TZ", "UTC")
|
os.Setenv("TZ", "UTC")
|
||||||
|
os.Exit(m.Run())
|
||||||
}
|
}
|
||||||
|
|
||||||
func readYamlObjects(objectFile string) ([]client.Object, error) {
|
func readYamlObjects(objectFile string) ([]client.Object, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user