@@ -110,20 +110,37 @@ func TestSingleGroupChange(t *testing.T) {
110
110
podZeroName := testUtil .HelmInstall (t , options , releaseName , kubectlOptions , helmChartPath )
111
111
112
112
k8s .WaitUntilPodAvailable (t , kubectlOptions , podZeroName , 15 , 20 * time .Second )
113
+ // wait until the pod is in Running status
114
+ output , err := testUtil .WaitUntilPodRunning (t , kubectlOptions , podZeroName , 20 , 15 * time .Second )
115
+ if err != nil {
116
+ t .Error (err .Error ())
117
+ }
118
+ if output != "Running" {
119
+ t .Error (output )
120
+ }
113
121
114
122
newGroupName := "new_group"
115
123
116
124
helmUpgradeOptions := & helm.Options {
117
125
KubectlOptions : kubectlOptions ,
118
126
SetValues : map [string ]string {
119
- "group.name" : newGroupName ,
127
+ "image.repository" : imageRepo ,
128
+ "image.tag" : imageTag ,
129
+ "group.name" : newGroupName ,
120
130
},
121
131
}
122
132
helm .Upgrade (t , helmUpgradeOptions , helmChartPath , releaseName )
123
133
124
134
k8s .RunKubectl (t , kubectlOptions , "delete" , "pod" , podZeroName )
125
135
126
- k8s .WaitUntilPodAvailable (t , kubectlOptions , podZeroName , 15 , 20 * time .Second )
136
+ // wait until the pod is in Running status
137
+ output , err = testUtil .WaitUntilPodRunning (t , kubectlOptions , podZeroName , 20 , 15 * time .Second )
138
+ if err != nil {
139
+ t .Error (err .Error ())
140
+ }
141
+ if output != "Running" {
142
+ t .Error (output )
143
+ }
127
144
128
145
// wait until the pod is in Ready status
129
146
tunnel := k8s .NewTunnel (
@@ -195,8 +212,14 @@ func TestMultipleGroupChange(t *testing.T) {
195
212
t .Logf ("====Installing Helm Chart " + dnodeReleaseName )
196
213
dnodePodName := testUtil .HelmInstall (t , options , dnodeReleaseName , kubectlOptions , helmChartPath )
197
214
198
- // wait until the pod is in ready status
199
- k8s .WaitUntilPodAvailable (t , kubectlOptions , dnodePodName , 15 , 20 * time .Second )
215
+ // wait until the pod is in Running status
216
+ output , err := testUtil .WaitUntilPodRunning (t , kubectlOptions , dnodePodName , 20 , 15 * time .Second )
217
+ if err != nil {
218
+ t .Error (err .Error ())
219
+ }
220
+ if output != "Running" {
221
+ t .Error (output )
222
+ }
200
223
201
224
bootstrapHost := fmt .Sprintf ("%s-0.%s.%s.svc.cluster.local" , dnodeReleaseName , dnodeReleaseName , namespaceName )
202
225
enodeOptions := & helm.Options {
@@ -217,23 +240,38 @@ func TestMultipleGroupChange(t *testing.T) {
217
240
t .Logf ("====Installing Helm Chart " + enodeReleaseName )
218
241
enodePodName0 := testUtil .HelmInstall (t , enodeOptions , enodeReleaseName , kubectlOptions , helmChartPath )
219
242
220
- // wait until the first enode pod is in Ready status
221
- k8s .WaitUntilPodAvailable (t , kubectlOptions , enodePodName0 , 15 , 20 * time .Second )
243
+ // wait until the pod is in Running status
244
+ output , err = testUtil .WaitUntilPodRunning (t , kubectlOptions , enodePodName0 , 20 , 15 * time .Second )
245
+ if err != nil {
246
+ t .Error (err .Error ())
247
+ }
248
+ if output != "Running" {
249
+ t .Error (output )
250
+ }
222
251
223
252
newDnodeGroupName := "newDnode"
224
253
newEnodeGroupName := "newEnode"
225
254
226
255
helmUpgradeOptionsDnode := & helm.Options {
227
256
KubectlOptions : kubectlOptions ,
228
257
SetValues : map [string ]string {
229
- "group.name" : newDnodeGroupName ,
258
+ "image.repository" : imageRepo ,
259
+ "image.tag" : imageTag ,
260
+ "group.name" : newDnodeGroupName ,
230
261
},
231
262
}
232
263
helm .Upgrade (t , helmUpgradeOptionsDnode , helmChartPath , dnodeReleaseName )
233
264
234
265
k8s .RunKubectl (t , kubectlOptions , "delete" , "pod" , dnodePodName )
235
266
236
- k8s .WaitUntilPodAvailable (t , kubectlOptions , dnodePodName , 15 , 20 * time .Second )
267
+ // wait until the pod is in Running status
268
+ output , err = testUtil .WaitUntilPodRunning (t , kubectlOptions , dnodePodName , 20 , 15 * time .Second )
269
+ if err != nil {
270
+ t .Error (err .Error ())
271
+ }
272
+ if output != "Running" {
273
+ t .Error (output )
274
+ }
237
275
238
276
tunnel := k8s .NewTunnel (
239
277
kubectlOptions , k8s .ResourceTypePod , dnodePodName , 8002 , 8002 )
@@ -252,14 +290,23 @@ func TestMultipleGroupChange(t *testing.T) {
252
290
helmUpgradeOptionsEnode := & helm.Options {
253
291
KubectlOptions : kubectlOptions ,
254
292
SetValues : map [string ]string {
255
- "group.name" : newEnodeGroupName ,
293
+ "image.repository" : imageRepo ,
294
+ "image.tag" : imageTag ,
295
+ "group.name" : newEnodeGroupName ,
256
296
},
257
297
}
258
298
helm .Upgrade (t , helmUpgradeOptionsEnode , helmChartPath , enodeReleaseName )
259
299
260
300
k8s .RunKubectl (t , kubectlOptions , "delete" , "pod" , enodePodName0 )
261
301
262
- k8s .WaitUntilPodAvailable (t , kubectlOptions , enodePodName0 , 15 , 20 * time .Second )
302
+ // wait until the pod is in Running status
303
+ output , err = testUtil .WaitUntilPodRunning (t , kubectlOptions , enodePodName0 , 20 , 15 * time .Second )
304
+ if err != nil {
305
+ t .Error (err .Error ())
306
+ }
307
+ if output != "Running" {
308
+ t .Error (output )
309
+ }
263
310
264
311
// change the group name for dnode and verify it passes
265
312
t .Logf ("====Test updating group name for %s to %s" , enodeGrpName , newEnodeGroupName )
0 commit comments