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

DXCDT-283: Remove config command #532

Merged
merged 6 commits into from
Dec 3, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ test-unit: ## Run unit tests
test-integration: $(GO_BIN)/commander ## Run integration tests. To run a specific test pass the FILTER var. Usage: `make test-integration FILTER="attack protection"`
${call print, "Running integration tests"}
@$(MAKE) install # ensure fresh install prior to running test
auth0 config init && commander test ./test/integration/test-cases.yaml --filter "$(FILTER)"; \
auth0 tenants add ${AUTH0_CLI_CLIENT_DOMAIN} --client-id ${AUTH0_CLI_CLIENT_ID} --client-secret ${AUTH0_CLI_CLIENT_SECRET} && commander test ./test/integration/test-cases.yaml --filter "$(FILTER)"; \
exit_code=$$?; \
bash ./test/integration/scripts/test-cleanup.sh; \
exit $$exit_code
Expand Down
8 changes: 0 additions & 8 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,6 @@ func defaultConfigPath() string {
return path.Join(os.Getenv("HOME"), ".config", "auth0", "config.json")
}

func (c *cli) setPath(p string) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only used by config command.

if p == "" {
c.path = defaultConfigPath()
return
}
c.path = p
}

func canPrompt(cmd *cobra.Command) bool {
noInput, err := cmd.Root().Flags().GetBool("no-input")

Expand Down
133 changes: 0 additions & 133 deletions internal/cli/config.go

This file was deleted.

1 change: 0 additions & 1 deletion internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ func addSubcommands(rootCmd *cobra.Command, cli *cli) {
// relevance or relation with other commands:
rootCmd.AddCommand(loginCmd(cli))
rootCmd.AddCommand(logoutCmd(cli))
rootCmd.AddCommand(configCmd(cli))
rootCmd.AddCommand(tenantsCmd(cli))
rootCmd.AddCommand(appsCmd(cli))
rootCmd.AddCommand(usersCmd(cli))
Expand Down
3 changes: 3 additions & 0 deletions internal/cli/tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ func addTenantCmd(cli *cli) *cobra.Command {
},
}

tenantClientID.RegisterString(cmd, &inputs.ClientID, "")
tenantClientSecret.RegisterString(cmd, &inputs.ClientSecret, "")
Comment on lines +228 to +229
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The auth0 tenants add command never respected the usage of of client ID and client secret flags. This fixes that.


return cmd
}

Expand Down