Skip to content

Commit

Permalink
solved the wrong config and inlined the key env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
girishramnani-crest committed Aug 10, 2017
1 parent 62cd62a commit a638adc
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions vsphere/resource_vsphere_license_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,33 +76,27 @@ 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"
}`
}

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 {
Expand Down

0 comments on commit a638adc

Please # to comment.