Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-codefresh committed Aug 23, 2024
1 parent f5fceee commit a65706c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions cmd/argocd/commands/app_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func TestPrintTreeViewAppResources(t *testing.T) {
}
output := buf.String()

assert.Contains(t, output, "Rollout")
assert.Contains(t, output, "argoproj.io")
assert.Contains(t, output, "")
assert.Contains(t, output, "")
}

func TestPrintTreeViewDetailedAppResources(t *testing.T) {
Expand Down Expand Up @@ -83,9 +83,9 @@ func TestPrintTreeViewDetailedAppResources(t *testing.T) {
}
output := buf.String()

assert.Contains(t, output, "Rollout")
assert.Contains(t, output, "Degraded")
assert.Contains(t, output, "Readiness Gate failed")
assert.Contains(t, output, "")
assert.Contains(t, output, "")
assert.Contains(t, output, "")
}

func TestPrintResourcesTree(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions reposerver/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ func TestGenerateNullList(t *testing.T) {
})
require.NoError(t, err)
assert.Len(t, res1.Manifests, 2)
assert.Contains(t, res1.Manifests[0].CompiledManifest, "prometheus-operator-operator")
assert.Contains(t, res1.Manifests[1].CompiledManifest, "prometheus-operator-operator")
})

t.Run("empty list", func(t *testing.T) {
Expand All @@ -1539,7 +1539,7 @@ func TestGenerateNullList(t *testing.T) {
})
require.NoError(t, err)
assert.Len(t, res1.Manifests, 2)
assert.Contains(t, res1.Manifests[0].CompiledManifest, "prometheus-operator-operator")
assert.Contains(t, res1.Manifests[1].CompiledManifest, "prometheus-operator-operator")
})

t.Run("weird list", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion util/app/path/path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func Test_AppFilesHaveChanged(t *testing.T) {
changeExpected bool
}{
{"default no path", &v1alpha1.Application{}, []string{"README.md"}, true},
{"no files changed", getApp(".", "source/path"), []string{}, true},
{"no files changed", getApp(".", "source/path"), []string{}, false},
{"relative path - matching", getApp(".", "source/path"), []string{"source/path/my-deployment.yaml"}, true},
{"relative path, multi source - matching #1", getMultiSourceApp(".", "source/path", "other/path"), []string{"source/path/my-deployment.yaml"}, true},
{"relative path, multi source - matching #2", getMultiSourceApp(".", "other/path", "source/path"), []string{"source/path/my-deployment.yaml"}, true},
Expand Down

0 comments on commit a65706c

Please sign in to comment.