mirror of
https://github.com/fluxcd/flux2.git
synced 2025-10-29 15:28:04 +08:00
Replace init() with TestMain()
Signed-off-by: Allen Porter <allen@thebends.org>
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user