diff --git a/test/run.sh b/test/run.sh index f9205ea..26db1f7 100755 --- a/test/run.sh +++ b/test/run.sh @@ -1,5 +1,17 @@ #!/bin/bash +if [ "$1" != "aws" ] && [ "$1" != "azure" ] +then + echo "Usage: $0 " + exit +fi + +if [[ "$1" = "aws" ]]; then + test_class="TestTerraformAws" +else + test_class="TestTerraformAzure" +fi + source .env AWS_TEST_REGION=$AWS_TEST_REGION \ @@ -8,4 +20,4 @@ AWS_TEST_SSH_KEYPAIR=$AWS_TEST_SSH_KEYPAIR \ AWS_TEST_SUBNET_IDS=$AWS_TEST_SUBNET_IDS \ AWS_TEST_AVAILABILITY_ZONES=$AWS_TEST_AVAILABILITY_ZONES \ AZURE_TEST_SUBSCRIPTION_ID=$AZURE_TEST_SUBSCRIPTION_ID \ -go test -timeout 30m -run TestTerraformAzure +go test -timeout 30m -run "${test_class}"