@@ -86,8 +86,6 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
8686 output , err := osFixture .ExecCommand ("oc" , "auth" , "can-i" , "use" , "scc/anyuid" , "--as" , serviceAccountUser )
8787 hasPermission := false
8888 if err == nil && len (output ) > 0 {
89- // Check if the service account user is already in the users list
90- // Remove quotes and whitespace for comparison
9189 output = strings .TrimSpace (strings .Trim (output , "'\" " ))
9290 if strings .Contains (output , serviceAccountUser ) {
9391 hasPermission = true
@@ -146,6 +144,12 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
146144 RepoURL : "https://github.com/argoproj-labs/argocd-image-updater/" ,
147145 Path : "test/e2e/testdata/005-public-guestbook" ,
148146 TargetRevision : "HEAD" ,
147+ // multi-arch image
148+ Kustomize : & appv1alpha1.ApplicationSourceKustomize {
149+ Images : appv1alpha1.KustomizeImages {
150+ "quay.io/dkarpele/my-guestbook=quay.io/prometheus/node-exporter:v1.6.0" ,
151+ },
152+ },
149153 },
150154 Destination : appv1alpha1.ApplicationDestination {
151155 Server : "https://kubernetes.default.svc" ,
@@ -175,8 +179,9 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
175179 NamePattern : "app*" ,
176180 Images : []imageUpdaterApi.ImageConfig {
177181 {
178- Alias : "guestbook" ,
179- ImageName : "quay.io/dkarpele/my-guestbook:~29437546.0" ,
182+ Alias : "guestbook" ,
183+ // Watch for the v1.7.x bumps
184+ ImageName : "quay.io/prometheus/node-exporter:~v1.7.0" ,
180185 CommonUpdateSettings : & imageUpdaterApi.CommonUpdateSettings {
181186 UpdateStrategy : & updateStrategy ,
182187 },
@@ -188,7 +193,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
188193 }
189194 Expect (k8sClient .Create (ctx , imageUpdater )).To (Succeed ())
190195
191- By ("ensuring that the Application image has `29437546.0` version after update " )
196+ By ("ensuring that the Application image has been updated by Image Updater " )
192197 Eventually (func () string {
193198 err := k8sClient .Get (ctx , client .ObjectKeyFromObject (app ), app )
194199
@@ -197,17 +202,19 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
197202 return "" // Let Eventually retry on error
198203 }
199204
200- // Nil-safe check: The Kustomize block is only added by the Image Updater after its first run.
201- // We must check that it and its Images field exist before trying to access them.
202205 if app .Spec .Source .Kustomize != nil && len (app .Spec .Source .Kustomize .Images ) > 0 {
203- imageStr := string (app .Spec .Source .Kustomize .Images [0 ])
204- GinkgoWriter .Printf ("Found Kustomize image: %s\n " , imageStr )
206+ // Join all images to handle any appending behaviors
207+ var allImages []string
208+ for _ , img := range app .Spec .Source .Kustomize .Images {
209+ allImages = append (allImages , string (img ))
210+ }
211+ imageStr := strings .Join (allImages , ", " )
212+ GinkgoWriter .Printf ("Found Kustomize image string: %s\n " , imageStr )
205213 return imageStr
206214 }
207215
208- // Return an empty string to signify the condition is not yet met.
209216 return ""
210- }, "10m" , "10s" ).Should (Equal ( "quay.io/dkarpele/my-guestbook:29437546.0 " ), "Image Updater did not update the Application image within timeout" )
217+ }, "10m" , "10s" ).Should (ContainSubstring ( "v1.7. " ), "Image Updater did not update the Application image within timeout" )
211218 })
212219 })
213220})
0 commit comments