Skip to content

Commit

Permalink
fix broken after merge unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-codefresh committed Jan 6, 2025
1 parent d2b88a2 commit d8b7bed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controller/appcontroller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ func TestNormalizeApplication(t *testing.T) {
normalized := false
fakeAppCs.AddReactor("patch", "*", func(action kubetesting.Action) (handled bool, ret runtime.Object, err error) {
if patchAction, ok := action.(kubetesting.PatchAction); ok {
if string(patchAction.GetPatch()) == `{"spec":{"project":"default"},"status":{"sync":{"comparedTo":{"destination":{},"source":{"repoURL":""}}}}}` {
if string(patchAction.GetPatch()) == `{"spec":{"project":"default"}}` {
normalized = true
}
}
Expand Down
9 changes: 8 additions & 1 deletion reposerver/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,14 @@ func newServiceWithCommitSHA(t *testing.T, root, revision string) *Service {
}

func TestGenerateYamlManifestInDir(t *testing.T) {
service := newService(t, "../../manifests/base")
service, gitClient, _ := newServiceWithMocks(t, "../../manifests/base", false)

gitClient.On("RevisionMetadata", mock.Anything).Return(&git.RevisionMetadata{
Message: "test",
Author: "author",
Date: time.Now(),
Tags: []string{"tag1", "tag2"},
}, nil) // CF required because of changes in repo server

src := argoappv1.ApplicationSource{Path: "."}
q := apiclient.ManifestRequest{
Expand Down

0 comments on commit d8b7bed

Please sign in to comment.