@@ -170,7 +170,7 @@ var _ = Describe("DevWorkspace Controller", func() {
170170 Context ("Workspace Objects creation" , func () {
171171
172172 BeforeEach (func () {
173- createDevWorkspace ("test-devworkspace.yaml" )
173+ createDevWorkspace (devWorkspaceName , "test-devworkspace.yaml" )
174174 })
175175
176176 AfterEach (func () {
@@ -206,7 +206,7 @@ var _ = Describe("DevWorkspace Controller", func() {
206206 })
207207
208208 It ("Creates DevWorkspaceRouting" , func () {
209- devworkspace := getExistingDevWorkspace ()
209+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
210210 workspaceID := devworkspace .Status .DevWorkspaceId
211211
212212 By ("Checking that DevWorkspaceRouting is created" )
@@ -223,7 +223,7 @@ var _ = Describe("DevWorkspace Controller", func() {
223223 })
224224
225225 It ("Syncs Routing mainURL to DevWorkspace" , func () {
226- devworkspace := getExistingDevWorkspace ()
226+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
227227 workspaceID := devworkspace .Status .DevWorkspaceId
228228
229229 By ("Manually making Routing ready to continue" )
@@ -239,7 +239,7 @@ var _ = Describe("DevWorkspace Controller", func() {
239239 })
240240
241241 It ("Creates workspace metadata configmap" , func () {
242- devworkspace := getExistingDevWorkspace ()
242+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
243243 workspaceID := devworkspace .Status .DevWorkspaceId
244244
245245 By ("Manually making Routing ready to continue" )
@@ -266,7 +266,7 @@ var _ = Describe("DevWorkspace Controller", func() {
266266 })
267267
268268 It ("Syncs the DevWorkspace ServiceAccount" , func () {
269- devworkspace := getExistingDevWorkspace ()
269+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
270270 workspaceID := devworkspace .Status .DevWorkspaceId
271271
272272 By ("Manually making Routing ready to continue" )
@@ -285,7 +285,7 @@ var _ = Describe("DevWorkspace Controller", func() {
285285 })
286286
287287 It ("Syncs DevWorkspace Deployment" , func () {
288- devworkspace := getExistingDevWorkspace ()
288+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
289289 workspaceID := devworkspace .Status .DevWorkspaceId
290290
291291 By ("Manually making Routing ready to continue" )
@@ -304,7 +304,7 @@ var _ = Describe("DevWorkspace Controller", func() {
304304 })
305305
306306 It ("Marks DevWorkspace as Running" , func () {
307- devworkspace := getExistingDevWorkspace ()
307+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
308308 workspaceID := devworkspace .Status .DevWorkspaceId
309309
310310 workspacecontroller .SetupHttpClientsForTesting (& http.Client {
@@ -354,7 +354,7 @@ var _ = Describe("DevWorkspace Controller", func() {
354354 },
355355 },
356356 })
357- createDevWorkspace ("test-devworkspace.yaml" )
357+ createDevWorkspace (devWorkspaceName , "test-devworkspace.yaml" )
358358 })
359359
360360 AfterEach (func () {
@@ -363,7 +363,7 @@ var _ = Describe("DevWorkspace Controller", func() {
363363 })
364364
365365 It ("Mounts image pull secrets to the DevWorkspace Deployment" , func () {
366- devworkspace := getExistingDevWorkspace ()
366+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
367367 workspaceID := devworkspace .Status .DevWorkspaceId
368368
369369 By ("Creating secrets for docker configs" )
@@ -395,7 +395,7 @@ var _ = Describe("DevWorkspace Controller", func() {
395395 })
396396
397397 It ("Manages git credentials for DevWorkspace" , func () {
398- devworkspace := getExistingDevWorkspace ()
398+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
399399 workspaceID := devworkspace .Status .DevWorkspaceId
400400
401401 By ("Creating a secret for git credentials" )
@@ -457,7 +457,7 @@ var _ = Describe("DevWorkspace Controller", func() {
457457 })
458458
459459 It ("Automounts secrets and configmaps volumes" , func () {
460- devworkspace := getExistingDevWorkspace ()
460+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
461461 workspaceID := devworkspace .Status .DevWorkspaceId
462462
463463 By ("Creating a automount secrets and configmaps" )
@@ -519,7 +519,7 @@ var _ = Describe("DevWorkspace Controller", func() {
519519 })
520520
521521 It ("Automounts secrets and configmaps env vars" , func () {
522- devworkspace := getExistingDevWorkspace ()
522+ devworkspace := getExistingDevWorkspace (devWorkspaceName )
523523 workspaceID := devworkspace .Status .DevWorkspaceId
524524
525525 By ("Creating a automount secrets and configmaps" )
@@ -574,7 +574,7 @@ var _ = Describe("DevWorkspace Controller", func() {
574574 },
575575 },
576576 })
577- createStartedDevWorkspace ("test-devworkspace.yaml" )
577+ createStartedDevWorkspace (devWorkspaceName , "test-devworkspace.yaml" )
578578 })
579579
580580 AfterEach (func () {
@@ -587,7 +587,7 @@ var _ = Describe("DevWorkspace Controller", func() {
587587
588588 By ("Setting DevWorkspace's .spec.started to false" )
589589 Eventually (func () error {
590- devworkspace = getExistingDevWorkspace ()
590+ devworkspace = getExistingDevWorkspace (devWorkspaceName )
591591 devworkspace .Spec .Started = false
592592 return k8sClient .Update (ctx , devworkspace )
593593 }, timeout , interval ).Should (Succeed (), "Update DevWorkspace to have .spec.started = false" )
@@ -645,7 +645,7 @@ var _ = Describe("DevWorkspace Controller", func() {
645645
646646 By ("Setting DevWorkspace's .spec.started to false" )
647647 Eventually (func () error {
648- devworkspace = getExistingDevWorkspace ()
648+ devworkspace = getExistingDevWorkspace (devWorkspaceName )
649649 devworkspace .Spec .Started = false
650650 return k8sClient .Update (ctx , devworkspace )
651651 }, timeout , interval ).Should (Succeed (), "Update DevWorkspace to have .spec.started = false" )
@@ -693,7 +693,7 @@ var _ = Describe("DevWorkspace Controller", func() {
693693
694694 By ("Set debug start annotation on DevWorkspace" )
695695 Eventually (func () error {
696- devworkspace = getExistingDevWorkspace ()
696+ devworkspace = getExistingDevWorkspace (devWorkspaceName )
697697 if devworkspace .Annotations == nil {
698698 devworkspace .Annotations = map [string ]string {}
699699 }
@@ -710,7 +710,7 @@ var _ = Describe("DevWorkspace Controller", func() {
710710
711711 By ("Setting failing phase on workspace directly" )
712712 Eventually (func () error {
713- devworkspace = getExistingDevWorkspace ()
713+ devworkspace = getExistingDevWorkspace (devWorkspaceName )
714714 devworkspace .Status .Phase = "Failing"
715715 devworkspace .Status .Conditions = append (devworkspace .Status .Conditions , dw.DevWorkspaceCondition {
716716 Type : dw .DevWorkspaceFailedStart ,
@@ -735,7 +735,7 @@ var _ = Describe("DevWorkspace Controller", func() {
735735
736736 By ("Setting failing phase on workspace directly" )
737737 Eventually (func () error {
738- devworkspace = getExistingDevWorkspace ()
738+ devworkspace = getExistingDevWorkspace (devWorkspaceName )
739739 devworkspace .Status .Phase = "Failing"
740740 return k8sClient .Status ().Update (ctx , devworkspace )
741741 }, timeout , interval ).Should (Succeed (), "Should be able to set failing status on DevWorkspace" )
0 commit comments