@@ -102,7 +102,11 @@ var _ = SIGDescribe("ContainerRecreateRequest", func() {
102
102
return crr .Status .Phase
103
103
}, 70 * time .Second , time .Second ).Should (gomega .Equal (appsv1alpha1 .ContainerRecreateRequestCompleted ))
104
104
gomega .Expect (crr .Status .CompletionTime ).ShouldNot (gomega .BeNil ())
105
- gomega .Expect (crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]).Should (gomega .Equal ("" ))
105
+ gomega .Eventually (func () string {
106
+ crr , err = tester .GetCRR (crr .Name )
107
+ gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
108
+ return crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]
109
+ }, 5 * time .Second , 1 * time .Second ).Should (gomega .Equal ("" ))
106
110
gomega .Expect (crr .Status .ContainerRecreateStates ).Should (gomega .Equal ([]appsv1alpha1.ContainerRecreateRequestContainerRecreateState {{Name : "app" , Phase : appsv1alpha1 .ContainerRecreateRequestSucceeded }}))
107
111
108
112
ginkgo .By ("Check Pod containers recreated and started for minStartedSeconds" )
@@ -145,7 +149,11 @@ var _ = SIGDescribe("ContainerRecreateRequest", func() {
145
149
return crr .Status .Phase
146
150
}, 60 * time .Second , 3 * time .Second ).Should (gomega .Equal (appsv1alpha1 .ContainerRecreateRequestCompleted ))
147
151
gomega .Expect (crr .Status .CompletionTime ).ShouldNot (gomega .BeNil ())
148
- gomega .Expect (crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]).Should (gomega .Equal ("" ))
152
+ gomega .Eventually (func () string {
153
+ crr , err = tester .GetCRR (crr .Name )
154
+ gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
155
+ return crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]
156
+ }, 5 * time .Second , 1 * time .Second ).Should (gomega .Equal ("" ))
149
157
gomega .Expect (crr .Status .ContainerRecreateStates ).Should (gomega .Equal ([]appsv1alpha1.ContainerRecreateRequestContainerRecreateState {
150
158
{Name : "app" , Phase : appsv1alpha1 .ContainerRecreateRequestSucceeded },
151
159
{Name : "sidecar" , Phase : appsv1alpha1 .ContainerRecreateRequestSucceeded },
@@ -256,7 +264,11 @@ var _ = SIGDescribe("ContainerRecreateRequest", func() {
256
264
return crr .Status .Phase
257
265
}, 60 * time .Second , 3 * time .Second ).Should (gomega .Equal (appsv1alpha1 .ContainerRecreateRequestCompleted ))
258
266
gomega .Expect (crr .Status .CompletionTime ).ShouldNot (gomega .BeNil ())
259
- gomega .Expect (crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]).Should (gomega .Equal ("" ))
267
+ gomega .Eventually (func () string {
268
+ crr , err = tester .GetCRR (crr .Name )
269
+ gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
270
+ return crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]
271
+ }, 5 * time .Second , 1 * time .Second ).Should (gomega .Equal ("" ))
260
272
gomega .Expect (crr .Status .ContainerRecreateStates ).Should (gomega .Equal ([]appsv1alpha1.ContainerRecreateRequestContainerRecreateState {
261
273
{Name : "app" , Phase : appsv1alpha1 .ContainerRecreateRequestSucceeded },
262
274
{Name : "sidecar" , Phase : appsv1alpha1 .ContainerRecreateRequestSucceeded },
@@ -320,7 +332,11 @@ var _ = SIGDescribe("ContainerRecreateRequest", func() {
320
332
return crr .Status .Phase
321
333
}, 60 * time .Second , 3 * time .Second ).Should (gomega .Equal (appsv1alpha1 .ContainerRecreateRequestCompleted ))
322
334
gomega .Expect (crr .Status .CompletionTime ).ShouldNot (gomega .BeNil ())
323
- gomega .Expect (crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]).Should (gomega .Equal ("" ))
335
+ gomega .Eventually (func () string {
336
+ crr , err = tester .GetCRR (crr .Name )
337
+ gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
338
+ return crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]
339
+ }, 5 * time .Second , 1 * time .Second ).Should (gomega .Equal ("" ))
324
340
gomega .Expect (crr .Status .ContainerRecreateStates ).Should (gomega .Equal ([]appsv1alpha1.ContainerRecreateRequestContainerRecreateState {
325
341
{Name : "app" , Phase : appsv1alpha1 .ContainerRecreateRequestSucceeded },
326
342
{Name : "sidecar" , Phase : appsv1alpha1 .ContainerRecreateRequestSucceeded },
@@ -366,7 +382,11 @@ var _ = SIGDescribe("ContainerRecreateRequest", func() {
366
382
return crr .Status .Phase
367
383
}, 5 * time .Second , 1 * time .Second ).Should (gomega .Equal (appsv1alpha1 .ContainerRecreateRequestCompleted ))
368
384
gomega .Expect (crr .Status .CompletionTime ).ShouldNot (gomega .BeNil ())
369
- gomega .Expect (crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]).Should (gomega .Equal ("" ))
385
+ gomega .Eventually (func () string {
386
+ crr , err = tester .GetCRR (crr .Name )
387
+ gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
388
+ return crr .Labels [appsv1alpha1 .ContainerRecreateRequestActiveKey ]
389
+ }, 5 * time .Second , 1 * time .Second ).Should (gomega .Equal ("" ))
370
390
gomega .Expect (crr .Status .ContainerRecreateStates ).Should (gomega .Equal ([]appsv1alpha1.ContainerRecreateRequestContainerRecreateState {
371
391
{Name : "app" , Phase : appsv1alpha1 .ContainerRecreateRequestPending },
372
392
{Name : "sidecar" , Phase : appsv1alpha1 .ContainerRecreateRequestPending },
0 commit comments