@@ -21,6 +21,7 @@ import (
21
21
"github.com/argoproj-labs/argocd-image-updater/test/fake"
22
22
"github.com/argoproj-labs/argocd-image-updater/test/fixture"
23
23
24
+ "github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
24
25
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
25
26
argogit "github.com/argoproj/argo-cd/v2/util/git"
26
27
"github.com/distribution/distribution/v3/manifest/schema1" //nolint:staticcheck
@@ -103,9 +104,6 @@ func Test_UpdateApplication(t *testing.T) {
103
104
return & regMock , nil
104
105
}
105
106
106
- argoClient := argomock.ArgoCD {}
107
- argoClient .On ("UpdateSpec" , mock .Anything , mock .Anything ).Return (nil , nil )
108
-
109
107
kubeClient := kube.KubernetesClient {
110
108
Clientset : fake .NewFakeKubeClient (),
111
109
}
@@ -137,6 +135,14 @@ func Test_UpdateApplication(t *testing.T) {
137
135
image .NewFromIdentifier ("jannfis/foobar:~1.0.0" ),
138
136
},
139
137
}
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
+
140
146
res := UpdateApplication (& UpdateConfiguration {
141
147
NewRegFN : mockClientFn ,
142
148
ArgoClient : & argoClient ,
0 commit comments