Skip to content

Commit

Permalink
renamed to test to have uppercase initials and better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
girishramnani-crest committed Aug 10, 2017
1 parent 6fe8231 commit 0a4fbfb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion vsphere/resource_vsphere_license.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ func getLicenseInfoFromKey(key string, manager *license.Manager) *types.LicenseM
// isKeyPresent iterates over the InfoList to check if the license is present or not.
func isKeyPresent(key string, manager *license.Manager) bool {

// TODO: Manage this error
infoList, _ := manager.List(context.TODO())

for _, info := range infoList {
Expand Down
14 changes: 7 additions & 7 deletions vsphere/resource_vsphere_license_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
}
)

func testAccVSphereLicenseBasic(t *testing.T) {
func TestAccVSphereLicenseBasic(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand All @@ -57,7 +57,7 @@ func testAccVSphereLicenseBasic(t *testing.T) {

}

func testAccVSphereLicenseInvalid(t *testing.T) {
func TestAccVSphereLicenseInvalid(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand All @@ -76,7 +76,7 @@ func testAccVSphereLicenseInvalid(t *testing.T) {

}

func testAccVSphereLicenseWithLabels(t *testing.T) {
func TestAccVSphereLicenseWithLabels(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand Down Expand Up @@ -237,16 +237,16 @@ func testAccVSphereLicenseWithLabelExists(name string) resource.TestCheckFunc {

}

func TestLabelToMaps(t *testing.T) {
func TestLabelToMap(t *testing.T) {

mapdata, err := labelsToMap(labelStub)
labelMap, err := labelsToMap(labelStub)

if err != nil {
t.Fatal("Error ", err)
}

if value, ok := mapdata["Hello"]; !ok || value != "World" {
t.Fatal("the map data is invalid")
if value, ok := labelMap["Hello"]; !ok || value != "World" {
t.Fatal("The label map doesn't contain labels as expected")
}

}

0 comments on commit 0a4fbfb

Please sign in to comment.