Skip to content

Commit 68ab8e2

Browse files
author
Eidmantas Ivanauskas
committed
test(git): fix Application annotations construction in grouping test
1 parent 4ee9083 commit 68ab8e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/argocd/git_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ package argocd
33
import (
44
"testing"
55
"github.com/argoproj-labs/argocd-image-updater/pkg/common"
6+
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
67
v1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
78
)
89

910
// Test that grouping does not mix different branches in one commit/push
1011
func Test_groupIntentsByBranch(t *testing.T) {
11-
appA := &v1alpha1.Application{Annotations: map[string]string{common.GitBranchAnnotation: "main:appA-branch"}}
12-
appB := &v1alpha1.Application{Annotations: map[string]string{common.GitBranchAnnotation: "main:appB-branch"}}
12+
appA := &v1alpha1.Application{ObjectMeta: v1.ObjectMeta{Annotations: map[string]string{common.GitBranchAnnotation: "main:appA-branch"}}}
13+
appB := &v1alpha1.Application{ObjectMeta: v1.ObjectMeta{Annotations: map[string]string{common.GitBranchAnnotation: "main:appB-branch"}}}
1314
wbcA := &WriteBackConfig{GitRepo: "https://example/repo.git", GitWriteBranch: "appA-branch"}
1415
wbcB := &WriteBackConfig{GitRepo: "https://example/repo.git", GitWriteBranch: "appB-branch"}
1516

0 commit comments

Comments
 (0)