@@ -41,22 +41,24 @@ var (
41
41
)
42
42
43
43
func TestMain (m *testing .M ) {
44
- testenv = env.New ()
45
- kindClusterName := envconf.RandomName (" my-cluster" , 16 )
46
- namespace := envconf.RandomName (" myns" , 16 )
47
-
48
- // Use pre-defined environment funcs to create a kind cluster prior to test run
49
- testenv.Setup (
50
- envfuncs.CreateKindCluster (kindClusterName),
51
- )
52
-
53
- // Use pre-defined environment funcs to teardown kind cluster after tests
54
- testenv.Finish (
55
- envfuncs.DeleteNamespace (namespace),
56
- )
57
-
58
- // launch package tests
59
- os.Exit (testenv.Run (m))
44
+ testenv = env.New ()
45
+ kindClusterName := envconf.RandomName (" my-cluster" , 16 )
46
+ namespace := envconf.RandomName (" myns" , 16 )
47
+
48
+ // Use pre-defined environment funcs to create a kind cluster prior to test run
49
+ testenv.Setup (
50
+ envfuncs.CreateCluster (kind.NewProvider (), kindClusterName),
51
+ envfuncs.CreateNamespace (namespace),
52
+ )
53
+
54
+ // Use pre-defined environment funcs to teardown kind cluster after tests
55
+ testenv.Finish (
56
+ envfuncs.DeleteNamespace (namespace),
57
+ envfuncs.DestroyCluster (kindClusterName),
58
+ )
59
+
60
+ // launch package tests
61
+ os.Exit (testenv.Run (m))
60
62
}
61
63
```
62
64
0 commit comments