Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: pashakostohrys <[email protected]>
  • Loading branch information
pasha-codefresh committed Sep 6, 2024
1 parent a050a8d commit 5f72a4f
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions reposerver/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3742,7 +3742,9 @@ func TestUpdateRevisionForPaths(t *testing.T) {
SyncedRevision: "SYNCEDHEAD",
Paths: []string{"."},
},
}, want: &apiclient.UpdateRevisionForPathsResponse{}, wantErr: assert.NoError},
}, want: &apiclient.UpdateRevisionForPathsResponse{
Revision: "632039659e542ed7de0c170a4fcc1c571b288fc0",
}, wantErr: assert.NoError},
{name: "ChangedFilesDoNothing", fields: func() fields {
s, _, c := newServiceWithOpt(t, func(gitClient *gitmocks.Client, helmClient *helmmocks.Client, paths *iomocks.TempPaths) {
gitClient.On("Init").Return(nil)
Expand All @@ -3768,7 +3770,10 @@ func TestUpdateRevisionForPaths(t *testing.T) {
SyncedRevision: "SYNCEDHEAD",
Paths: []string{"."},
},
}, want: &apiclient.UpdateRevisionForPathsResponse{}, wantErr: assert.NoError},
}, want: &apiclient.UpdateRevisionForPathsResponse{
Revision: "632039659e542ed7de0c170a4fcc1c571b288fc0",
Changes: true,
}, wantErr: assert.NoError},
{name: "NoChangesUpdateCache", fields: func() fields {
s, _, c := newServiceWithOpt(t, func(gitClient *gitmocks.Client, helmClient *helmmocks.Client, paths *iomocks.TempPaths) {
gitClient.On("Init").Return(nil)
Expand Down Expand Up @@ -3801,7 +3806,9 @@ func TestUpdateRevisionForPaths(t *testing.T) {
ApplicationSource: &argoappv1.ApplicationSource{Path: "."},
KubeVersion: "v1.16.0",
},
}, want: &apiclient.UpdateRevisionForPathsResponse{}, wantErr: assert.NoError, cacheHit: &cacheHit{
}, want: &apiclient.UpdateRevisionForPathsResponse{
Revision: "632039659e542ed7de0c170a4fcc1c571b288fc0",
}, wantErr: assert.NoError, cacheHit: &cacheHit{
previousRevision: "1e67a504d03def3a6a1125d934cb511680f72555",
revision: "632039659e542ed7de0c170a4fcc1c571b288fc0",
}},
Expand Down Expand Up @@ -3839,7 +3846,9 @@ func TestUpdateRevisionForPaths(t *testing.T) {

HasMultipleSources: true,
},
}, want: &apiclient.UpdateRevisionForPathsResponse{}, wantErr: assert.NoError, cacheHit: &cacheHit{
}, want: &apiclient.UpdateRevisionForPathsResponse{
Revision: "632039659e542ed7de0c170a4fcc1c571b288fc0",
}, wantErr: assert.NoError, cacheHit: &cacheHit{
previousRevision: "1e67a504d03def3a6a1125d934cb511680f72555",
revision: "632039659e542ed7de0c170a4fcc1c571b288fc0",
}},
Expand Down

0 comments on commit 5f72a4f

Please sign in to comment.