mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
Require a provider zone to be set in tests (#2720)
<!-- This change is generated by MagicModules. --> /cc @rileykarson
This commit is contained in:
parent
9f33f7bda7
commit
f8dec8bcfd
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user