diff --git a/google/provider_test.go b/google/provider_test.go index e3b34308..d738ea9b 100644 --- a/google/provider_test.go +++ b/google/provider_test.go @@ -35,6 +35,12 @@ var regionEnvVars = []string{ "CLOUDSDK_COMPUTE_REGION", } +var zoneEnvVars = []string{ + "GOOGLE_ZONE", + "GCLOUD_ZONE", + "CLOUDSDK_COMPUTE_ZONE", +} + var orgEnvVars = []string{ "GOOGLE_ORG", } @@ -97,6 +103,10 @@ func testAccPreCheck(t *testing.T) { if v := multiEnvSearch(regionEnvVars); v != "us-central1" { t.Fatalf("One of %s must be set to us-central1 for acceptance tests", strings.Join(regionEnvVars, ", ")) } + + if v := multiEnvSearch(zoneEnvVars); v != "us-central1-a" { + t.Fatalf("One of %s must be set to us-central1-a for acceptance tests", strings.Join(zoneEnvVars, ", ")) + } } func TestProvider_getRegionFromZone(t *testing.T) {