mirror of
				https://github.com/fluxcd/flux2.git
				synced 2025-10-31 08:17:19 +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
	 Allen Porter
					Allen Porter