From 34f5d63197a773296f8c718831c546ff41f2a9fc Mon Sep 17 00:00:00 2001 From: Takumi Sue <23391543+mikutas@users.noreply.github.com> Date: Wed, 8 Nov 2023 21:28:21 +0900 Subject: [PATCH] fix: failing lint and unit test (#16275) Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com> Signed-off-by: Kevin Lyda --- controller/state_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/controller/state_test.go b/controller/state_test.go index b08cb74f5b6e6..6eb336cff2ffb 100644 --- a/controller/state_test.go +++ b/controller/state_test.go @@ -151,12 +151,13 @@ func TestCompareAppStateNamespaceMetadataDiffersToManifest(t *testing.T) { kube.GetResourceKey(ns): ns, }, } - ctrl := newFakeController(&data) + ctrl := newFakeController(&data, nil) sources := make([]argoappv1.ApplicationSource, 0) sources = append(sources, app.Spec.GetSource()) revisions := make([]string, 0) revisions = append(revisions, "") - compRes := ctrl.appStateManager.CompareAppState(app, &defaultProj, revisions, sources, false, false, nil, false) + compRes, err := ctrl.appStateManager.CompareAppState(app, &defaultProj, revisions, sources, false, false, nil, false) + assert.Nil(t, err) assert.NotNil(t, compRes) assert.NotNil(t, compRes.syncStatus) assert.Equal(t, argoappv1.SyncStatusCodeOutOfSync, compRes.syncStatus.Status) @@ -208,12 +209,13 @@ func TestCompareAppStateNamespaceMetadata(t *testing.T) { kube.GetResourceKey(ns): ns, }, } - ctrl := newFakeController(&data) + ctrl := newFakeController(&data, nil) sources := make([]argoappv1.ApplicationSource, 0) sources = append(sources, app.Spec.GetSource()) revisions := make([]string, 0) revisions = append(revisions, "") - compRes := ctrl.appStateManager.CompareAppState(app, &defaultProj, revisions, sources, false, false, nil, false) + compRes, err := ctrl.appStateManager.CompareAppState(app, &defaultProj, revisions, sources, false, false, nil, false) + assert.Nil(t, err) assert.NotNil(t, compRes) assert.NotNil(t, compRes.syncStatus) assert.Equal(t, argoappv1.SyncStatusCodeOutOfSync, compRes.syncStatus.Status)