Skip to content

Commit

Permalink
made the config a const
Browse files Browse the repository at this point in the history
  • Loading branch information
girishramnani-crest committed Aug 14, 2017
1 parent d669808 commit f76eba8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions vsphere/resource_vsphere_license_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import (
"github.com/vmware/govmomi/license"
)

const testAccVSphereLicenseInvalidConfig = `
resource "vsphere_license" "foo" {
license_key = "HN422-47193-58V7M-03086-0JAN2"
}
`

func TestAccVSphereLicenseBasic(t *testing.T) {

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -45,7 +51,7 @@ func TestAccVSphereLicenseInvalid(t *testing.T) {
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccVSphereLicenseInvalidConfig(),
Config: testAccVSphereLicenseInvalidConfig,
Check: resource.ComposeTestCheckFunc(
testAccVSphereLicenseNotExists("vsphere_license.foo"),
),
Expand Down Expand Up @@ -110,13 +116,6 @@ func testAccVspherePreLicenseESXiServerIsSetCheck(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 {
return fmt.Sprintf(`
resource "vsphere_license" "foo" {
Expand Down

0 comments on commit f76eba8

Please sign in to comment.