@@ -95,10 +95,10 @@ func TestSeparateEDnode(t *testing.T) {
95
95
}
96
96
t .Logf ("Get hosts response:\n " + string (body ))
97
97
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 )
100
100
// verify bootstrap host exists on the cluster
101
- if bootstrapHost .String () == "" {
101
+ if bootstrapHostJSON .String () == "" {
102
102
t .Errorf ("Bootstrap does not exists on cluster" )
103
103
}
104
104
@@ -159,11 +159,11 @@ func TestSeparateEDnode(t *testing.T) {
159
159
}
160
160
t .Logf ("Get enode group response:\n " + string (body ))
161
161
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 )
164
164
165
165
// verify bootstrap host exists on the cluster
166
- if ! strings .Contains (enodeHostCount .String (), "2" ) {
166
+ if ! strings .Contains (enodeHostCountJSON .String (), "2" ) {
167
167
t .Errorf ("enode hosts does not exists on cluster" )
168
168
}
169
169
}
@@ -283,10 +283,10 @@ func TestIncorrectBootsrapHostname(t *testing.T) {
283
283
if resp , err = clusterStatus .Execute (); err != nil {
284
284
t .Fatalf (err .Error ())
285
285
}
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" )
287
287
// 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 )
290
290
}
291
291
t .Logf ("\n Cluster Status Response:\n \n " + string (body ))
292
292
@@ -379,10 +379,10 @@ func TestDefaultGroup(t *testing.T) {
379
379
if body , err = ioutil .ReadAll (resp .Body ); err != nil {
380
380
t .Fatalf (err .Error ())
381
381
}
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 )
386
386
}
387
387
388
388
t .Logf ("Groups status response:\n " + string (body ))
@@ -462,10 +462,10 @@ func TestSingleGroupCreated(t *testing.T) {
462
462
if body , err = ioutil .ReadAll (resp .Body ); err != nil {
463
463
t .Fatalf (err .Error ())
464
464
}
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" )
466
466
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 )
469
469
}
470
470
471
471
t .Logf ("Groups status response:\n " + string (body ))
0 commit comments