@@ -21,6 +21,7 @@ import (
2121 "github.com/argoproj-labs/argocd-image-updater/test/fake"
2222 "github.com/argoproj-labs/argocd-image-updater/test/fixture"
2323
24+ "github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
2425 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
2526 argogit "github.com/argoproj/argo-cd/v2/util/git"
2627 "github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck
@@ -103,9 +104,6 @@ func Test_UpdateApplication(t *testing.T) {
103104 return & regMock , nil
104105 }
105106
106- argoClient := argomock.ArgoCD {}
107- argoClient .On ("UpdateSpec" , mock .Anything , mock .Anything ).Return (nil , nil )
108-
109107 kubeClient := kube.KubernetesClient {
110108 Clientset : fake .NewFakeKubeClient (),
111109 }
@@ -137,6 +135,14 @@ func Test_UpdateApplication(t *testing.T) {
137135 image .NewFromIdentifier ("jannfis/foobar:~1.0.0" ),
138136 },
139137 }
138+
139+ argoClient := argomock.ArgoCD {}
140+ argoClient .On ("UpdateSpec" , mock .Anything , & application.ApplicationUpdateSpecRequest {
141+ Name : & appImages .Application .Name ,
142+ AppNamespace : & appImages .Application .Namespace ,
143+ Spec : & appImages .Application .Spec ,
144+ }).Return (nil , nil )
145+
140146 res := UpdateApplication (& UpdateConfiguration {
141147 NewRegFN : mockClientFn ,
142148 ArgoClient : & argoClient ,
0 commit comments