Skip to content

Commit c60243f

Browse files
committed
Fix linting errors
1 parent fcd59bf commit c60243f

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

test/e2e/separate_nodes_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ func TestSeparateEDnode(t *testing.T) {
9595
}
9696
t.Logf("Get hosts response:\n" + string(body))
9797

98-
bootstrapHost := gjson.Get(string(body), `host-default-list.list-items.list-item.#(roleref="bootstrap").nameref`)
99-
t.Logf(`BootstrapHost: = %s`, bootstrapHost)
98+
bootstrapHostJSON := gjson.Get(string(body), `host-default-list.list-items.list-item.#(roleref="bootstrap").nameref`)
99+
t.Logf(`BootstrapHost: = %s`, bootstrapHostJSON)
100100
// verify bootstrap host exists on the cluster
101-
if bootstrapHost.String() == "" {
101+
if bootstrapHostJSON.String() == "" {
102102
t.Errorf("Bootstrap does not exists on cluster")
103103
}
104104

@@ -159,11 +159,11 @@ func TestSeparateEDnode(t *testing.T) {
159159
}
160160
t.Logf("Get enode group response:\n" + string(body))
161161

162-
enodeHostCount := gjson.Get(string(body), `group-default.relations.relation-group.#(typeref="hosts").relation-count.value`)
163-
t.Logf(`enodeHostCount: = %s`, enodeHostCount)
162+
enodeHostCountJSON := gjson.Get(string(body), `group-default.relations.relation-group.#(typeref="hosts").relation-count.value`)
163+
t.Logf(`enodeHostCount: = %s`, enodeHostCountJSON)
164164

165165
// verify bootstrap host exists on the cluster
166-
if !strings.Contains(enodeHostCount.String(), "2") {
166+
if !strings.Contains(enodeHostCountJSON.String(), "2") {
167167
t.Errorf("enode hosts does not exists on cluster")
168168
}
169169
}
@@ -283,10 +283,10 @@ func TestIncorrectBootsrapHostname(t *testing.T) {
283283
if resp, err = clusterStatus.Execute(); err != nil {
284284
t.Fatalf(err.Error())
285285
}
286-
totalHostsJson := gjson.Get(string(body), "host-default-list.list-items.list-count.value")
286+
totalHostsJSON := gjson.Get(string(body), "host-default-list.list-items.list-count.value")
287287
// Total hosts be one as second host should have failed to create
288-
if totalHostsJson.Num != 1 {
289-
t.Errorf("Wrong number of hosts: %v instead of 1", totalHostsJson.Num)
288+
if totalHostsJSON.Num != 1 {
289+
t.Errorf("Wrong number of hosts: %v instead of 1", totalHostsJSON.Num)
290290
}
291291
t.Logf("\nCluster Status Response:\n\n" + string(body))
292292

@@ -379,10 +379,10 @@ func TestDefaultGroup(t *testing.T) {
379379
if body, err = ioutil.ReadAll(resp.Body); err != nil {
380380
t.Fatalf(err.Error())
381381
}
382-
groupName := gjson.Get(string(body), "group-default-list.list-items.list-item[0].nameref")
383-
groupQuantity := gjson.Get(string(body), "group-default-list.list-items.list-count.value")
384-
if groupName.Str != "Default" && groupQuantity.Num != 1 {
385-
t.Errorf("Only group should exist and it should be the Default group, instead %v groups exist and the first group is named %v", groupQuantity.Num, groupName.Str)
382+
groupNameJSON := gjson.Get(string(body), "group-default-list.list-items.list-item[0].nameref")
383+
groupQuantityJSON := gjson.Get(string(body), "group-default-list.list-items.list-count.value")
384+
if groupNameJSON.Str != "Default" && groupQuantityJSON.Num != 1 {
385+
t.Errorf("Only group should exist and it should be the Default group, instead %v groups exist and the first group is named %v", groupQuantityJSON.Num, groupNameJSON.Str)
386386
}
387387

388388
t.Logf("Groups status response:\n" + string(body))
@@ -462,10 +462,10 @@ func TestSingleGroupCreated(t *testing.T) {
462462
if body, err = ioutil.ReadAll(resp.Body); err != nil {
463463
t.Fatalf(err.Error())
464464
}
465-
groupQuantity := gjson.Get(string(body), "group-default-list.list-items.list-count.value")
465+
groupQuantityJSON := gjson.Get(string(body), "group-default-list.list-items.list-count.value")
466466

467-
if groupQuantity.Num != 1 {
468-
t.Errorf("Only group should exist, instead %v groups exist", groupQuantity.Num)
467+
if groupQuantityJSON.Num != 1 {
468+
t.Errorf("Only group should exist, instead %v groups exist", groupQuantityJSON.Num)
469469
}
470470

471471
t.Logf("Groups status response:\n" + string(body))

0 commit comments

Comments
 (0)