Skip to content

Commit

Permalink
fix: codegen and e2e tests (#17846)
Browse files Browse the repository at this point in the history
Signed-off-by: pashakostohrys <[email protected]>
  • Loading branch information
pasha-codefresh authored Apr 15, 2024
1 parent a5ae7bd commit ae04112
Show file tree
Hide file tree
Showing 9 changed files with 1,091 additions and 910 deletions.
1 change: 1 addition & 0 deletions docs/operator-manual/server-commands/argocd-repo-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ argocd-repo-server [flags]
--disable-helm-manifest-max-extracted-size Disable maximum size of helm manifest archives when extracted
--disable-tls Disable TLS on the gRPC endpoint
--helm-manifest-max-extracted-size string Maximum size of helm manifest archives when extracted (default "1G")
--helm-registry-max-index-size string Maximum size of registry index file (default "1G")
-h, --help help for argocd-repo-server
--logformat string Set the logging format. One of: text|json (default "text")
--loglevel string Set the logging level. One of: debug|info|warn|error (default "info")
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/applicat
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ApplicationSourcePluginParameter,String_
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ClusterCacheInfo,APIsCount
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ConnectionState,ModifiedAt
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ErrApplicationNotAllowedToUseProject,application
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ErrApplicationNotAllowedToUseProject,namespace
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,ErrApplicationNotAllowedToUseProject,project
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,HelmOptions,ValuesFileSchemes
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,JWTToken,ExpiresAt
API rule violation: names_match,github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1,JWTToken,IssuedAt
Expand Down
1,629 changes: 875 additions & 754 deletions pkg/apis/application/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions pkg/apis/application/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

331 changes: 183 additions & 148 deletions pkg/apis/application/v1alpha1/openapi_generated.go

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions pkg/apis/application/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
14 changes: 8 additions & 6 deletions test/e2e/delarative_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ 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 ae04112

Please sign in to comment.