diff --git a/command/agent/http_test.go b/command/agent/http_test.go index 24e8405148..f8aae75eb9 100644 --- a/command/agent/http_test.go +++ b/command/agent/http_test.go @@ -485,14 +485,14 @@ func TestACLResolution(t *testing.T) { defer a.Shutdown() // Check when no token is set - a.config.ACLToken = "" + a.Config.ACLToken = "" a.srv.parseToken(req, &token) if token != "" { t.Fatalf("bad: %s", token) } // Check when ACLToken set - a.config.ACLToken = "agent" + a.Config.ACLToken = "agent" a.srv.parseToken(req, &token) if token != "agent" { t.Fatalf("bad: %s", token) diff --git a/command/agent/operator_endpoint_test.go b/command/agent/operator_endpoint_test.go index f5ad07e1b3..ab33beb29d 100644 --- a/command/agent/operator_endpoint_test.go +++ b/command/agent/operator_endpoint_test.go @@ -430,7 +430,7 @@ func TestOperator_ServerHealth(t *testing.T) { } if len(out.Servers) != 1 || !out.Servers[0].Healthy || - out.Servers[0].Name != a.config.NodeName || + out.Servers[0].Name != a.Config.NodeName || out.Servers[0].SerfStatus != "alive" || out.FailureTolerance != 0 { r.Fatalf("bad: %v", out) @@ -464,7 +464,7 @@ func TestOperator_ServerHealth_Unhealthy(t *testing.T) { } if len(out.Servers) != 1 || out.Healthy || - out.Servers[0].Name != a.config.NodeName { + out.Servers[0].Name != a.Config.NodeName { r.Fatalf("bad: %#v", out.Servers) } }) diff --git a/command/agent/prepared_query_endpoint_test.go b/command/agent/prepared_query_endpoint_test.go index 484573dd5e..f42a38b146 100644 --- a/command/agent/prepared_query_endpoint_test.go +++ b/command/agent/prepared_query_endpoint_test.go @@ -289,8 +289,8 @@ func TestPreparedQuery_Execute(t *testing.T) { Node: "my-node", }, Agent: structs.QuerySource{ - Datacenter: a.config.Datacenter, - Node: a.config.NodeName, + Datacenter: a.Config.Datacenter, + Node: a.Config.NodeName, }, QueryOptions: structs.QueryOptions{ Token: "my-token", @@ -340,8 +340,8 @@ func TestPreparedQuery_Execute(t *testing.T) { t.Fatalf("expect node to be empty, got %q", args.Source.Node) } expect := structs.QuerySource{ - Datacenter: a.config.Datacenter, - Node: a.config.NodeName, + Datacenter: a.Config.Datacenter, + Node: a.Config.NodeName, } if !reflect.DeepEqual(args.Agent, expect) { t.Fatalf("expect: %#v\nactual: %#v", expect, args.Agent) @@ -493,8 +493,8 @@ func TestPreparedQuery_Explain(t *testing.T) { Node: "my-node", }, Agent: structs.QuerySource{ - Datacenter: a.config.Datacenter, - Node: a.config.NodeName, + Datacenter: a.Config.Datacenter, + Node: a.Config.NodeName, }, QueryOptions: structs.QueryOptions{ Token: "my-token", @@ -808,7 +808,7 @@ func TestPreparedQuery_Integration(t *testing.T) { { args := &structs.RegisterRequest{ Datacenter: "dc1", - Node: a.config.NodeName, + Node: a.Config.NodeName, Address: "127.0.0.1", Service: &structs.NodeService{ Service: "my-service", diff --git a/command/agent/session_endpoint_test.go b/command/agent/session_endpoint_test.go index a2eafaa980..5d907cecd7 100644 --- a/command/agent/session_endpoint_test.go +++ b/command/agent/session_endpoint_test.go @@ -22,11 +22,11 @@ func TestSessionCreate(t *testing.T) { // Create a health check args := &structs.RegisterRequest{ Datacenter: "dc1", - Node: a.config.NodeName, + Node: a.Config.NodeName, Address: "127.0.0.1", Check: &structs.HealthCheck{ CheckID: "consul", - Node: a.config.NodeName, + Node: a.Config.NodeName, Name: "consul", ServiceID: "consul", Status: api.HealthPassing, @@ -42,7 +42,7 @@ func TestSessionCreate(t *testing.T) { enc := json.NewEncoder(body) raw := map[string]interface{}{ "Name": "my-cool-session", - "Node": a.config.NodeName, + "Node": a.Config.NodeName, "Checks": []types.CheckID{consul.SerfCheckID, "consul"}, "LockDelay": "20s", } @@ -68,11 +68,11 @@ func TestSessionCreateDelete(t *testing.T) { // Create a health check args := &structs.RegisterRequest{ Datacenter: "dc1", - Node: a.config.NodeName, + Node: a.Config.NodeName, Address: "127.0.0.1", Check: &structs.HealthCheck{ CheckID: "consul", - Node: a.config.NodeName, + Node: a.Config.NodeName, Name: "consul", ServiceID: "consul", Status: api.HealthPassing, @@ -88,7 +88,7 @@ func TestSessionCreateDelete(t *testing.T) { enc := json.NewEncoder(body) raw := map[string]interface{}{ "Name": "my-cool-session", - "Node": a.config.NodeName, + "Node": a.Config.NodeName, "Checks": []types.CheckID{consul.SerfCheckID, "consul"}, "LockDelay": "20s", "Behavior": structs.SessionKeysDelete,