From a638adcba0a692a4400d924bd42cea059d80d1ac Mon Sep 17 00:00:00 2001 From: "girish.ramnani" Date: Tue, 8 Aug 2017 17:28:42 +0530 Subject: [PATCH] solved the wrong config and inlined the key env variable --- vsphere/resource_vsphere_license_test.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/vsphere/resource_vsphere_license_test.go b/vsphere/resource_vsphere_license_test.go index 3970012cd..b33a46711 100644 --- a/vsphere/resource_vsphere_license_test.go +++ b/vsphere/resource_vsphere_license_test.go @@ -76,7 +76,6 @@ func TestAccVSphereLicenseWithLabels(t *testing.T) { } func testAccVSphereLicenseInvalidConfig() string { - // quite sure this key cannot be valid return `resource "vsphere_license" "foo" { license_key = "HN422-47193-58V7M-03086-0JAN2" @@ -84,25 +83,20 @@ func testAccVSphereLicenseInvalidConfig() string { } func testAccVSphereLicenseWithLabelConfig() string { - // precheck already checks if this is present or not - key := os.Getenv("VSPHERE_LICENSE") return fmt.Sprintf(`resource "vsphere_license" "foo" { license_key = "%s" - labels { VpxClientLicenseLabel = "Hello World" - TestTitle = FooBar + TestTitle = "FooBar" } - }`, key) + }`, os.Getenv("VSPHERE_LICENSE")) } func testAccVSphereLicenseBasicConfig() string { - // precheck already checks if this is present or not - key := os.Getenv("VSPHERE_LICENSE") return fmt.Sprintf(`resource "vsphere_license" "foo" { license_key = "%s" } - `, key) + `, os.Getenv("VSPHERE_LICENSE")) } func testAccVSphereLicenseDestroy(s *terraform.State) error {