Skip to content

Commit

Permalink
fix: fix issue with e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomazpu committed Oct 22, 2024
1 parent bb8a110 commit fa7dc2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
17 changes: 2 additions & 15 deletions cmd/monaco/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ func validateAuthenticationWithProjectConfigs(projects []project.Project, loaded
for envName, env := range p.Configs {
for _, conf := range env {
switch conf[0].Type.(type) {
case config.ClassicApiType:
case config.ClassicApiType,
config.SettingsType:
if loadedManifest.Environments[envName].Auth.Token == nil && conf[0].Skip == false {
return fmt.Errorf("API: %s requires token", conf[0].Type)
}
Expand All @@ -264,20 +265,6 @@ func validateAuthenticationWithProjectConfigs(projects []project.Project, loaded
}
}
}
/*p.ForEveryConfigDo(func(c config.Config) {
switch c.Type.(type) {
case config.ClassicApiType:
if loadedManifest.Environments[c.Environment].Auth.Token == nil && c.Skip == false {
err = fmt.Errorf("API: %s requires token", c.Type)
return
}
default:
if loadedManifest.Environments[c.Environment].Auth.OAuth == nil && c.Skip == false {
err = fmt.Errorf("API: %v requires oAuth", c.Type)
return
}
}
})*/
}
return nil
}
2 changes: 1 addition & 1 deletion pkg/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func Configs(ctx context.Context, clients ClientSet, _ api.APIs, automationResou
automationTypeOrder := []config.AutomationResource{config.Workflow, config.SchedulingRule, config.BusinessCalendar}
for _, key := range automationTypeOrder {
entries := copiedDeleteEntries[string(key)]
if clients.Automation == nil {
if clients.Automation == (*coreAutomation.Client)(nil) {
log.WithCtxFields(ctx).WithFields(field.Type(key)).Warn("Skipped deletion of %d Automation configuration(s) of type %q as API client was unavailable.", len(entries), key)
delete(copiedDeleteEntries, string(key))
continue
Expand Down

0 comments on commit fa7dc2a

Please sign in to comment.