@@ -209,12 +209,15 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
209209 return false
210210 }
211211
212- controllerLabels := appsetDepl .Spec .Template .Labels
212+ if err := k8sClient .Get (ctx , client .ObjectKeyFromObject (controllerSS ), controllerSS ); err != nil {
213+ return false
214+ }
215+ controllerLabels := controllerSS .Spec .Template .Labels
213216 _ , hasCustom = controllerLabels ["custom" ]
214217 _ , hasCustom2 = controllerLabels ["custom2" ]
215218
216219 if ! hasCustom || ! hasCustom2 {
217- GinkgoWriter .Printf ("Label 'custom' or 'custom2' missing from repo deployment, current labels: %v\n " , controllerLabels )
220+ GinkgoWriter .Printf ("Label 'custom' or 'custom2' missing from controller deployment, current labels: %v\n " , controllerLabels )
218221 return false
219222 }
220223 return true
@@ -270,7 +273,10 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
270273
271274 By ("verifying that the labels of server and repo deployments are not affected" )
272275 Eventually (func () bool {
273- if err := k8sClient .Get (ctx , client .ObjectKeyFromObject (appsetDepl ), appsetDepl ); err != nil {
276+ if err := k8sClient .Get (ctx , client .ObjectKeyFromObject (serverDepl ), serverDepl ); err != nil {
277+ return false
278+ }
279+ if err := k8sClient .Get (ctx , client .ObjectKeyFromObject (repoDepl ), repoDepl ); err != nil {
274280 return false
275281 }
276282 _ , hasCustom := serverDepl .Spec .Template .Labels ["custom2" ]
@@ -382,7 +388,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
382388 return true
383389 }, "2m" , "5s" ).Should (BeTrue ())
384390
385- By ("completelyremoving all custom labels and annotations from ArgoCD CR" )
391+ By ("completely removing all custom labels and annotations from ArgoCD CR" )
386392
387393 argocdFixture .Update (argoCD , func (ac * argov1beta1api.ArgoCD ) {
388394 ac .Spec .Server .Labels = map [string ]string {}
0 commit comments