From 888fa5cad6737acc0b28dfb3a5ad096da4db6cff Mon Sep 17 00:00:00 2001 From: James Phillips Date: Thu, 4 May 2017 15:05:23 -0700 Subject: [PATCH] test: Moves a variable closer to where it's used. --- command/agent/operator_endpoint_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/agent/operator_endpoint_test.go b/command/agent/operator_endpoint_test.go index 36bc8f351f..5289d11dc4 100644 --- a/command/agent/operator_endpoint_test.go +++ b/command/agent/operator_endpoint_test.go @@ -476,9 +476,10 @@ func TestOperator_ServerHealth(t *testing.T) { } func TestOperator_ServerHealth_Unhealthy(t *testing.T) { - threshold := time.Duration(-1) cb := func(c *Config) { c.RaftProtocol = 3 + + threshold := time.Duration(-1) c.Autopilot.LastContactThreshold = &threshold } httpTestWithConfig(t, func(srv *HTTPServer) {