Skip to content

Commit

Permalink
fix e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: pashakostohrys <[email protected]>
  • Loading branch information
pasha-codefresh committed Apr 15, 2024
1 parent fce49c1 commit b964057
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/e2e/app_management_ns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ func TestNamespacedInvalidAppProject(t *testing.T) {
Then().
// We're not allowed to infer whether the project exists based on this error message. Instead, we get a generic
// permission denied error.
Expect(Error("", "permission denied"))
Expect(Error("", "is not allowed"))
}

func TestNamespacedAppDeletion(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ func TestInvalidAppProject(t *testing.T) {
Then().
// We're not allowed to infer whether the project exists based on this error message. Instead, we get a generic
// permission denied error.
Expect(Error("", "permission denied"))
Expect(Error("", "is not allowed"))
}

func TestAppDeletion(t *testing.T) {
Expand Down
15 changes: 9 additions & 6 deletions test/e2e/declarative_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ func TestDeclarativeInvalidProject(t *testing.T) {
Expect(Success("")).
Expect(HealthIs(health.HealthStatusUnknown)).
Expect(SyncStatusIs(SyncStatusCodeUnknown)).
Expect(Condition(ApplicationConditionInvalidSpecError, "Application referencing project garbage which does not exist")).
When().
Delete(false).
Then().
Expect(Success("")).
Expect(DoesNotExist())
Expect(Condition(ApplicationConditionInvalidSpecError, "Application referencing project garbage which does not exist"))

// TODO: you can`t delete application with invalid project due to enforcment that was recently added,
// in https://github.com/argoproj/argo-cd/security/advisories/GHSA-2gvw-w6fj-7m3c
//When().
//Delete(false).
//Then().
//Expect(Success("")).
//Expect(DoesNotExist())
}

func TestDeclarativeInvalidRepoURL(t *testing.T) {
Expand Down

0 comments on commit b964057

Please sign in to comment.