diff --git a/tests/end-to-end-tests/basic_deployment_test.go b/tests/end-to-end-tests/basic_deployment_test.go index 4bffffd..6cab76f 100644 --- a/tests/end-to-end-tests/basic_deployment_test.go +++ b/tests/end-to-end-tests/basic_deployment_test.go @@ -22,6 +22,10 @@ func TestBasicDeployment(t *testing.T) { terraformStateStorageAccount := os.Getenv("TF_STATE_STORAGE_ACCOUNT") terraformStateContainer := os.Getenv("TF_STATE_STORAGE_CONTAINER") + if terraformStateResourceGroup == "" || terraformStateStorageAccount == "" || terraformStateContainer == "" { + t.Fatalf("One or more required environment variables (TF_STATE_RESOURCE_GROUP, TF_STATE_STORAGE_ACCOUNT, TF_STATE_STORAGE_CONTAINER) are not set.") + } + vaultName := random.UniqueId() vaultLocation := "uksouth" vaultRedundancy := "LocallyRedundant" diff --git a/tests/end-to-end-tests/full_deployment_test.go b/tests/end-to-end-tests/full_deployment_test.go index bfa0c0b..3b5d047 100644 --- a/tests/end-to-end-tests/full_deployment_test.go +++ b/tests/end-to-end-tests/full_deployment_test.go @@ -26,6 +26,10 @@ func TestFullDeployment(t *testing.T) { terraformStateStorageAccount := os.Getenv("TF_STATE_STORAGE_ACCOUNT") terraformStateContainer := os.Getenv("TF_STATE_STORAGE_CONTAINER") + if terraformStateResourceGroup == "" || terraformStateStorageAccount == "" || terraformStateContainer == "" { + t.Fatalf("One or more required environment variables (TF_STATE_RESOURCE_GROUP, TF_STATE_STORAGE_ACCOUNT, TF_STATE_STORAGE_CONTAINER) are not set.") + } + vaultName := random.UniqueId() vaultLocation := "uksouth" vaultRedundancy := "LocallyRedundant"