@@ -2166,6 +2166,52 @@ replicas: 1
21662166 assert .Error (t , err )
21672167 })
21682168
2169+ t .Run ("Nil source merge for Helm source with Helm values file" , func (t * testing.T ) {
2170+ app := v1alpha1.Application {
2171+ ObjectMeta : v1.ObjectMeta {
2172+ Name : "testapp" ,
2173+ Annotations : map [string ]string {
2174+ "argocd-image-updater.argoproj.io/image-list" : "nginx" ,
2175+ "argocd-image-updater.argoproj.io/write-back-method" : "git" ,
2176+ "argocd-image-updater.argoproj.io/write-back-target" : "helmvalues:./test-values.yaml" ,
2177+ "argocd-image-updater.argoproj.io/nginx.helm.image-name" : "image.name" ,
2178+ "argocd-image-updater.argoproj.io/nginx.helm.image-tag" : "image.tag" ,
2179+ },
2180+ },
2181+ Spec : v1alpha1.ApplicationSpec {
2182+ Source : & v1alpha1.ApplicationSource {
2183+ RepoURL : "https://example.com/example" ,
2184+ TargetRevision : "main" ,
2185+ Helm : & v1alpha1.ApplicationSourceHelm {
2186+ Parameters : []v1alpha1.HelmParameter {
2187+ {
2188+ Name : "image.name" ,
2189+ Value : "nginx" ,
2190+ ForceString : true ,
2191+ },
2192+ {
2193+ Name : "image.tag" ,
2194+ Value : "v1.0.0" ,
2195+ ForceString : true ,
2196+ },
2197+ },
2198+ },
2199+ },
2200+ },
2201+ Status : v1alpha1.ApplicationStatus {
2202+ SourceType : v1alpha1 .ApplicationSourceTypeHelm ,
2203+ Summary : v1alpha1.ApplicationSummary {
2204+ Images : []string {
2205+ "nginx:v0.0.0" ,
2206+ },
2207+ },
2208+ },
2209+ }
2210+
2211+ _ , err := marshalParamsOverride (& app , nil )
2212+ assert .NoError (t , err )
2213+ })
2214+
21692215 t .Run ("Unknown source" , func (t * testing.T ) {
21702216 app := v1alpha1.Application {
21712217 ObjectMeta : v1.ObjectMeta {
0 commit comments