@@ -280,7 +280,11 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
280280
281281 By ("adding image pull policy env variable to IMAGE_PULL_POLICY in Subscription" )
282282
283- os .Setenv ("IMAGE_PULL_POLICY" , "Always" )
283+ fixture .SetEnvInOperatorSubscriptionOrDeployment ("IMAGE_PULL_POLICY" , "Always" )
284+ defer func () {
285+ By ("removing IMAGE_PULL_POLICY environment variable to restore default behavior" )
286+ fixture .RestoreSubcriptionToDefault ()
287+ }()
284288
285289 By ("verifying Argo CD in openshift-gitops exists and is available" )
286290 argoCD , err := argocdFixture .GetOpenShiftGitOpsNSArgoCD ()
@@ -331,7 +335,11 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
331335
332336 By ("updating image pull policy env variable to Never" )
333337
334- os .Setenv ("IMAGE_PULL_POLICY" , "Never" )
338+ fixture .SetEnvInOperatorSubscriptionOrDeployment ("IMAGE_PULL_POLICY" , "Never" )
339+ defer func () {
340+ By ("removing IMAGE_PULL_POLICY environment variable to restore default behavior" )
341+ fixture .RestoreSubcriptionToDefault ()
342+ }()
335343
336344 By ("verifying backend deployment has ImagePullPolicy changed based on env variable" )
337345 Eventually (func () bool {
@@ -362,7 +370,11 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
362370 return true
363371 }, "3m" , "5s" ).Should (BeTrue ())
364372
365- os .Setenv ("IMAGE_PULL_POLICY" , "IfNotPresent" )
373+ fixture .SetEnvInOperatorSubscriptionOrDeployment ("IMAGE_PULL_POLICY" , "IfNotPresent" )
374+ defer func () {
375+ By ("removing IMAGE_PULL_POLICY environment variable to restore default behavior" )
376+ fixture .RestoreSubcriptionToDefault ()
377+ }()
366378
367379 By ("verifying backend deployment has ImagePullPolicy changed based on env variable" )
368380 Eventually (func () bool {
0 commit comments