File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ var clusters map[string]*integration.ClusterV3 = map[string]*integration.Cluster
11
11
12
12
// NewCluster new a embedded cluster
13
13
func NewCluster (t * testing.T , prefix string ) * integration.ClusterV3 {
14
- c , ok := clusters [t .Name ()]
15
- if ! ok {
14
+ cluster := clusters [t .Name ()]
15
+ if cluster == nil {
16
16
integration .BeforeTestExternal (t )
17
- cluster : = integration .NewClusterV3 (t , & integration.ClusterConfig {Size : 1 })
17
+ cluster = integration .NewClusterV3 (t , & integration.ClusterConfig {Size : 1 })
18
18
t .Cleanup (func () {
19
19
cluster .Terminate (t )
20
20
delete (clusters , t .Name ())
@@ -24,7 +24,6 @@ func NewCluster(t *testing.T, prefix string) *integration.ClusterV3 {
24
24
cliv3 .Watcher = namespace .NewWatcher (cliv3 .Watcher , prefix )
25
25
cliv3 .Lease = namespace .NewLease (cliv3 .Lease , prefix )
26
26
clusters [t .Name ()] = cluster
27
- return cluster
28
27
}
29
- return c
28
+ return cluster
30
29
}
You can’t perform that action at this time.
0 commit comments