mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
provider/google: Moving the XPN EnvVar check into provider_test.go to stop failed build
This commit is contained in:
parent
a40d538584
commit
1aacd62faf
@ -74,6 +74,10 @@ func testAccPreCheck(t *testing.T) {
|
||||
if v := multiEnvSearch(regs); v != "us-central1" {
|
||||
t.Fatalf("One of %s must be set to us-central1 for acceptance tests", strings.Join(regs, ", "))
|
||||
}
|
||||
|
||||
if v := os.Getenv("GOOGLE_XPN_HOST_PROJECT"); v == "" {
|
||||
t.Fatal("GOOGLE_XPN_HOST_PROJECT must be set for acceptance tests")
|
||||
}
|
||||
}
|
||||
|
||||
func TestProvider_getRegionFromZone(t *testing.T) {
|
||||
|
@ -423,9 +423,6 @@ func TestAccComputeInstance_subnet_xpn(t *testing.T) {
|
||||
var instance compute.Instance
|
||||
var instanceName = fmt.Sprintf("instance-test-%s", acctest.RandString(10))
|
||||
var xpn_host = os.Getenv("GOOGLE_XPN_HOST_PROJECT")
|
||||
if xpn_host == "" {
|
||||
t.Fatal("GOOGLE_XPN_HOST_PROJECT must be set for TestAccComputeInstance_subnet_xpn test")
|
||||
}
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
|
Loading…
Reference in New Issue
Block a user