Skip to content

Commit efd50db

Browse files
use mutex by default for start tests
1 parent 8ee1bf2 commit efd50db

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

minikube/service/minikube_client_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ func TestMinikubeClient_Start(t *testing.T) {
2121
nRunner Node
2222
dLoader Downloader
2323
nodes int
24+
tfCreationLock sync.Mutex
2425
}
2526

2627
ctrl := gomock.NewController(t)
@@ -44,6 +45,7 @@ func TestMinikubeClient_Start(t *testing.T) {
4445
nRunner: getNodeSuccess(ctrl),
4546
dLoader: getDownloadSuccess(ctrl),
4647
nodes: 1,
48+
tfCreationLock: sync.Mutex{},
4749
},
4850
wantErr: false,
4951
},
@@ -63,6 +65,7 @@ func TestMinikubeClient_Start(t *testing.T) {
6365
nRunner: getNodeSuccess(ctrl),
6466
dLoader: getDownloadSuccess(ctrl),
6567
nodes: 1,
68+
tfCreationLock: sync.Mutex{},
6669
},
6770
wantErr: false,
6871
},
@@ -82,6 +85,7 @@ func TestMinikubeClient_Start(t *testing.T) {
8285
nRunner: getMultipleNodesSuccess(ctrl, 3),
8386
dLoader: getDownloadSuccess(ctrl),
8487
nodes: 3,
88+
tfCreationLock: sync.Mutex{},
8589
},
8690
wantErr: false,
8791
},
@@ -101,6 +105,7 @@ func TestMinikubeClient_Start(t *testing.T) {
101105
nRunner: getMultipleNodesFailure(ctrl),
102106
dLoader: getDownloadSuccess(ctrl),
103107
nodes: 3,
108+
tfCreationLock: sync.Mutex{},
104109
},
105110
wantErr: true,
106111
},
@@ -118,6 +123,7 @@ func TestMinikubeClient_Start(t *testing.T) {
118123
nRunner: nil,
119124
dLoader: getDownloadFailure(ctrl),
120125
nodes: 1,
126+
tfCreationLock: sync.Mutex{},
121127
},
122128
wantErr: true,
123129
},
@@ -135,6 +141,7 @@ func TestMinikubeClient_Start(t *testing.T) {
135141
nRunner: nil,
136142
dLoader: getTarballFailure(ctrl),
137143
nodes: 1,
144+
tfCreationLock: sync.Mutex{},
138145
},
139146
wantErr: true,
140147
},
@@ -152,6 +159,7 @@ func TestMinikubeClient_Start(t *testing.T) {
152159
nRunner: getProvisionerFailure(ctrl),
153160
dLoader: getDownloadSuccess(ctrl),
154161
nodes: 1,
162+
tfCreationLock: sync.Mutex{},
155163
},
156164
wantErr: true,
157165
},
@@ -169,6 +177,7 @@ func TestMinikubeClient_Start(t *testing.T) {
169177
nRunner: getStartFailure(ctrl),
170178
dLoader: getDownloadSuccess(ctrl),
171179
nodes: 1,
180+
tfCreationLock: sync.Mutex{},
172181
},
173182
wantErr: true,
174183
},

0 commit comments

Comments
 (0)