diff --git a/.gitignore b/.gitignore index 8995d2775..879ca564a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,3 @@ tags .vscode .DS_Store -# integration test helper -auth0-cli-config-generator diff --git a/commander.yaml b/commander.yaml index e578b66a2..f300216fd 100644 --- a/commander.yaml +++ b/commander.yaml @@ -5,5 +5,14 @@ tests: auth0 apis list: exit-code: 0 + auth0 apps list: + exit-code: 0 + auth0 logs: exit-code: 0 + + auth0 actions list: + exit-code: 0 + + auth0 completion bash: + exit-code: 0 diff --git a/docs/ci.md b/docs/ci.md new file mode 100644 index 000000000..885df6e97 --- /dev/null +++ b/docs/ci.md @@ -0,0 +1,12 @@ +# Continuous Integration + +## Integration Tests + +Integration tests can be run with: +```bash +make integration +``` + +`make integration` will build and run the `auth0-cli-config-generator` command which is responsible for ensuring that a valid auth0-cli config file exists before the integration tests run. + +`make integration` will then use [commander](https://github.com/commander-cli/commander) to run tests defined in [commander.yaml](./commander.yaml) diff --git a/pkg/auth0-cli-config-generator/main.go b/pkg/auth0-cli-config-generator/main.go index 9f4cbf419..9ba4ee745 100644 --- a/pkg/auth0-cli-config-generator/main.go +++ b/pkg/auth0-cli-config-generator/main.go @@ -127,6 +127,7 @@ func persistConfig(filePath string, c config, overwrite bool) error { func main() { var cmd = &cobra.Command{ Use: "auth0-cli-config-generator", + Short: "A tool that generates valid auth0-cli config files", SilenceErrors: true, SilenceUsage: true, RunE: func(command *cobra.Command, args []string) error {