mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-21 23:21:48 +00:00
Merge pull request #1688 from allenporter/flux-test-main
Replace init() with TestMain()
This commit is contained in:
commit
daeef98dfb
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue