Skip to content

Commit 1e537c8

Browse files
author
Eidmantas Ivanauskas
committed
fix(build): add missing sort import; adjust tests for queued write semantics
1 parent 85550e2 commit 1e537c8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

cmd/run.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"sync"
1111
"text/template"
1212
"time"
13+
"sort"
1314

1415
"github.com/argoproj-labs/argocd-image-updater/pkg/argocd"
1516
"github.com/argoproj-labs/argocd-image-updater/pkg/common"

pkg/argocd/update_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ func Test_UpdateApplication(t *testing.T) {
4343
return &regMock, nil
4444
}
4545

46-
argoClient := argomock.ArgoCD{}
47-
argoClient.On("UpdateSpec", mock.Anything, mock.Anything).Return(nil, nil)
46+
argoClient := argomock.ArgoCD{}
47+
argoClient.On("UpdateSpec", mock.Anything, mock.Anything).Return(nil, nil)
4848

4949
kubeClient := kube.ImageUpdaterKubernetesClient{
5050
KubeClient: &registryKube.KubernetesClient{
@@ -83,15 +83,15 @@ func Test_UpdateApplication(t *testing.T) {
8383
},
8484
Images: *parseImageList(annotations),
8585
}
86-
res := UpdateApplication(&UpdateConfiguration{
86+
res := UpdateApplication(&UpdateConfiguration{
8787
NewRegFN: mockClientFn,
8888
ArgoClient: &argoClient,
8989
KubeClient: &kubeClient,
9090
UpdateApp: appImages,
9191
DryRun: false,
9292
}, NewSyncIterationState())
93-
assert.Equal(t, v1alpha1.KustomizeImage("gcr.io/jannfis/foobar:1.0.3"), appImages.Application.Spec.Source.Kustomize.Images[0])
94-
assert.Equal(t, v1alpha1.KustomizeImage("gcr.io/jannfis/barbar:1.0.3"), appImages.Application.Spec.Source.Kustomize.Images[1])
93+
assert.Equal(t, v1alpha1.KustomizeImage("gcr.io/jannfis/foobar:1.0.3"), appImages.Application.Spec.Source.Kustomize.Images[0])
94+
assert.Equal(t, v1alpha1.KustomizeImage("gcr.io/jannfis/barbar:1.0.3"), appImages.Application.Spec.Source.Kustomize.Images[1])
9595
assert.Equal(t, 0, res.NumErrors)
9696
assert.Equal(t, 0, res.NumSkipped)
9797
assert.Equal(t, 1, res.NumApplicationsProcessed)

0 commit comments

Comments
 (0)