diff --git a/api/health_test.go b/api/health_test.go index b69e9275fd..796afa7f56 100644 --- a/api/health_test.go +++ b/api/health_test.go @@ -192,8 +192,9 @@ func TestAPI_HealthChecks_AggregatedStatus(t *testing.T) { func TestAPI_HealthChecks(t *testing.T) { t.Parallel() + const nodename = "node123" c, s := makeClientWithConfig(t, nil, func(conf *testutil.TestServerConfig) { - conf.NodeName = "node123" + conf.NodeName = nodename }) defer s.Stop() @@ -215,7 +216,7 @@ func TestAPI_HealthChecks(t *testing.T) { retry.Run(t, func(r *retry.R) { checks := HealthChecks{ &HealthCheck{ - Node: "node123", + Node: nodename, CheckID: "service:foo", Name: "Service 'foo' check", Status: "critical",