Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove app name check on ChangeAPIApplication #1561

Merged
merged 2 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/command/project_application_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (c *Commands) addAPIApplication(ctx context.Context, projectAgg *eventstore
}

func (c *Commands) ChangeAPIApplication(ctx context.Context, apiApp *domain.APIApp, resourceOwner string) (*domain.APIApp, error) {
if !apiApp.IsValid() || apiApp.AppID == "" || apiApp.AggregateID == "" {
if apiApp.AppID == "" || apiApp.AggregateID == "" {
return nil, caos_errs.ThrowInvalidArgument(nil, "COMMAND-1m900", "Errors.Project.App.APIConfigInvalid")
}

Expand Down
21 changes: 0 additions & 21 deletions internal/command/project_application_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,27 +272,6 @@ func TestCommandSide_ChangeAPIApplication(t *testing.T) {
args args
res res
}{
{
name: "invalid app, invalid argument error",
fields: fields{
eventstore: eventstoreExpect(
t,
),
},
args: args{
ctx: context.Background(),
apiApp: &domain.APIApp{
ObjectRoot: models.ObjectRoot{
AggregateID: "project1",
},
AppID: "app1",
},
resourceOwner: "org1",
},
res: res{
err: caos_errs.IsErrorInvalidArgument,
},
},
{
name: "missing appid, invalid argument error",
fields: fields{
Expand Down
2 changes: 1 addition & 1 deletion internal/static/i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Errors:
NotActive:: Application is not active
NotInactive: Application is not inactive
OIDCConfigInvalid: OIDC configuration is invalid
APIConfigInvalid: OIDC configuration is invalid
APIConfigInvalid: API configuration is invalid
IsNotOIDC: Application is not type oidc
IsNotAPI: Application is not type API
OIDCAuthMethodNoSecret: Chosen OIDC Auth Method does not require a secret
Expand Down