From be17d7ac122c29c5c0dce2b82312493b812b03ec Mon Sep 17 00:00:00 2001 From: Paddy Date: Tue, 23 May 2017 14:28:06 -0700 Subject: [PATCH] Remove required env var, fix test names. We no longer need to set an env var (yaaay!) and our test names use camelCase not snake_case, though that confusion is understandable. --- builtin/providers/google/provider_test.go | 4 ---- builtin/providers/google/resource_compute_disk_test.go | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/builtin/providers/google/provider_test.go b/builtin/providers/google/provider_test.go index a93038fe7..b6f6859e4 100644 --- a/builtin/providers/google/provider_test.go +++ b/builtin/providers/google/provider_test.go @@ -78,10 +78,6 @@ func testAccPreCheck(t *testing.T) { if v := os.Getenv("GOOGLE_XPN_HOST_PROJECT"); v == "" { t.Fatal("GOOGLE_XPN_HOST_PROJECT must be set for acceptance tests") } - - if v := os.Getenv("GOOGLE_COMPUTE_DISK_SNAPSHOT_URI"); v == "" { - t.Fatal("GOOGLE_COMPUTE_DISK_SNAPSHOT_URI must be set for acceptance tests") - } } func TestProvider_getRegionFromZone(t *testing.T) { diff --git a/builtin/providers/google/resource_compute_disk_test.go b/builtin/providers/google/resource_compute_disk_test.go index c86d42203..91f29c985 100644 --- a/builtin/providers/google/resource_compute_disk_test.go +++ b/builtin/providers/google/resource_compute_disk_test.go @@ -31,7 +31,7 @@ func TestAccComputeDisk_basic(t *testing.T) { }) } -func TestAccComputeDisk_from_snapshot_uri(t *testing.T) { +func TestAccComputeDisk_fromSnapshotURI(t *testing.T) { diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) firstDiskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) snapshotName := fmt.Sprintf("tf-test-%s", acctest.RandString(10)) @@ -45,7 +45,7 @@ func TestAccComputeDisk_from_snapshot_uri(t *testing.T) { CheckDestroy: testAccCheckComputeDiskDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccComputeDisk_from_snapshot_uri(firstDiskName, snapshotName, diskName, xpn_host), + Config: testAccComputeDisk_fromSnapshotURI(firstDiskName, snapshotName, diskName, xpn_host), Check: resource.ComposeTestCheckFunc( testAccCheckComputeDiskExists( "google_compute_disk.seconddisk", &disk), @@ -155,7 +155,7 @@ resource "google_compute_disk" "foobar" { }`, diskName) } -func testAccComputeDisk_from_snapshot_uri(firstDiskName string, snapshotName string, diskName string, xpn_host string) string { +func testAccComputeDisk_fromSnapshotURI(firstDiskName, snapshotName, diskName, xpn_host string) string { return fmt.Sprintf(` resource "google_compute_disk" "foobar" { name = "%s"