Skip to content

Commit 09c5bdc

Browse files
committed
fixup! fix
Signed-off-by: Oleksii Kurinnyi <[email protected]>
1 parent 2aa8708 commit 09c5bdc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

controllers/workspace/devworkspace_controller_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ var _ = Describe("DevWorkspace Controller", func() {
150150
return err == nil
151151
}, timeout, interval).Should(BeTrue(), "DevWorkspace should exist in cluster")
152152

153+
By("Waiting for the first DevWorkspace to have its ID set")
154+
Eventually(func() (string, error) {
155+
if err := k8sClient.Get(ctx, dwNamespacedName, createdDW); err != nil {
156+
return "", err
157+
}
158+
return createdDW.Status.DevWorkspaceId, nil
159+
}, timeout, interval).Should(Equal("test-workspace-id"), "First DevWorkspace should have ID set from override annotation")
160+
153161
By("Creating a DevWorkspace that duplicates the workspace ID of the first")
154162
Expect(k8sClient.Create(ctx, devworkspace2)).Should(Succeed())
155163
defer deleteDevWorkspace(devworkspace2.Name)
@@ -407,6 +415,13 @@ var _ = Describe("DevWorkspace Controller", func() {
407415
createObject(gitCredentials)
408416
defer deleteObject(gitCredentials)
409417

418+
By("Waiting for DevWorkspaceRouting to be created")
419+
dwr := &controllerv1alpha1.DevWorkspaceRouting{}
420+
dwrName := common.DevWorkspaceRoutingName(workspaceID)
421+
Eventually(func() error {
422+
return k8sClient.Get(ctx, namespacedName(dwrName, testNamespace), dwr)
423+
}, timeout, interval).Should(Succeed(), "DevWorkspaceRouting should be created")
424+
410425
By("Manually making Routing ready to continue")
411426
markRoutingReady(testURL, common.DevWorkspaceRoutingName(workspaceID))
412427

0 commit comments

Comments
 (0)