Skip to content

Commit 5b95994

Browse files
committed
Tweak e2e tests for resource creation to verify that aw stays running
1 parent cb88f15 commit 5b95994

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/e2e/appwrapper_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,32 @@ var _ = Describe("AppWrapper E2E Test", func() {
5151
aw := createAppWrapper(ctx, pod(250), pod(250))
5252
appwrappers = append(appwrappers, aw)
5353
Expect(waitAWPodsReady(ctx, aw)).Should(Succeed())
54+
Consistently(AppWrapperPhase(ctx, aw), 5*time.Second).Should(Equal(workloadv1beta2.AppWrapperRunning))
5455
})
5556
It("Deployments", func() {
5657
aw := createAppWrapper(ctx, deployment(2, 200))
5758
appwrappers = append(appwrappers, aw)
5859
Expect(waitAWPodsReady(ctx, aw)).Should(Succeed())
60+
Consistently(AppWrapperPhase(ctx, aw), 5*time.Second).Should(Equal(workloadv1beta2.AppWrapperRunning))
5961
})
6062
It("StatefulSets", func() {
6163
aw := createAppWrapper(ctx, statefulset(2, 200))
6264
appwrappers = append(appwrappers, aw)
6365
Expect(waitAWPodsReady(ctx, aw)).Should(Succeed())
66+
Consistently(AppWrapperPhase(ctx, aw), 5*time.Second).Should(Equal(workloadv1beta2.AppWrapperRunning))
6467
})
6568
It("Batch Jobs", func() {
6669
aw := createAppWrapper(ctx, batchjob(250))
6770
appwrappers = append(appwrappers, aw)
6871
Expect(waitAWPodsReady(ctx, aw)).Should(Succeed())
72+
Consistently(AppWrapperPhase(ctx, aw), 5*time.Second).Should(Equal(workloadv1beta2.AppWrapperRunning))
6973
})
7074

7175
It("Mixed Basic Resources", func() {
7276
aw := createAppWrapper(ctx, pod(100), deployment(2, 100), statefulset(2, 100), service(), batchjob(100))
7377
appwrappers = append(appwrappers, aw)
7478
Expect(waitAWPodsReady(ctx, aw)).Should(Succeed())
79+
Consistently(AppWrapperPhase(ctx, aw), 10*time.Second).Should(Equal(workloadv1beta2.AppWrapperRunning))
7580
})
7681
})
7782

@@ -80,6 +85,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
8085
aw := createAppWrapper(ctx, pytorchjob(2, 250))
8186
appwrappers = append(appwrappers, aw)
8287
Expect(waitAWPodsReady(ctx, aw)).Should(Succeed())
88+
Consistently(AppWrapperPhase(ctx, aw), 5*time.Second).Should(Equal(workloadv1beta2.AppWrapperRunning))
8389
})
8490
})
8591

0 commit comments

Comments
 (0)