diff --git a/Makefile b/Makefile index 8642502a4..456f3aa2a 100644 --- a/Makefile +++ b/Makefile @@ -140,10 +140,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 login --domain ${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 + @bash ./test/integration/scripts/run-test-suites.sh test-mocks: $(GO_BIN)/mockgen ## Generate testing mocks using mockgen ${call print, "Generating test mocks"} diff --git a/test/integration/scripts/run-test-suites.sh b/test/integration/scripts/run-test-suites.sh new file mode 100644 index 000000000..2c1161f06 --- /dev/null +++ b/test/integration/scripts/run-test-suites.sh @@ -0,0 +1,18 @@ +#! /bin/bash -v + +set -e + +auth0 login \ + --domain "${AUTH0_CLI_CLIENT_DOMAIN}" \ + --client-id "${AUTH0_CLI_CLIENT_ID}" \ + --client-secret "${AUTH0_CLI_CLIENT_SECRET}" + +set +e + +commander test --filter "$FILTER" --dir ./test/integration + +exit_code=$? + +bash ./test/integration/scripts/test-cleanup.sh + +exit $exit_code