From 3542d7fcb66ece5b0e3e4036fd0013d074a2f323 Mon Sep 17 00:00:00 2001 From: Kyle Havlovitz Date: Wed, 1 Nov 2017 11:25:33 -0700 Subject: [PATCH] Remove redundant lines from coordinate test --- agent/coordinate_endpoint.go | 1 - agent/coordinate_endpoint_test.go | 2 +- api/coordinate_test.go | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/agent/coordinate_endpoint.go b/agent/coordinate_endpoint.go index deaad933e..4e4ea1296 100644 --- a/agent/coordinate_endpoint.go +++ b/agent/coordinate_endpoint.go @@ -105,7 +105,6 @@ func (s *HTTPServer) CoordinateNode(resp http.ResponseWriter, req *http.Request) var out structs.IndexedCoordinates defer setMeta(resp, &out.QueryMeta) if err := s.agent.RPC("Coordinate.Node", &args, &out); err != nil { - sort.Sort(&sorter{out.Coordinates}) return nil, err } diff --git a/agent/coordinate_endpoint_test.go b/agent/coordinate_endpoint_test.go index c7005e926..b34197c4a 100644 --- a/agent/coordinate_endpoint_test.go +++ b/agent/coordinate_endpoint_test.go @@ -194,7 +194,7 @@ func TestCoordinate_Node(t *testing.T) { } time.Sleep(300 * time.Millisecond) - // Query back and check the nodes are present and sorted correctly. + // Query back and check the nodes are present. req, _ = http.NewRequest("GET", "/v1/coordinate/node/foo?dc=dc1", nil) resp = httptest.NewRecorder() obj, err = a.srv.CoordinateNode(resp, req) diff --git a/api/coordinate_test.go b/api/coordinate_test.go index aae1ddf1a..cf0f82c33 100644 --- a/api/coordinate_test.go +++ b/api/coordinate_test.go @@ -1,9 +1,8 @@ package api import ( - "testing" - "strings" + "testing" "github.com/hashicorp/consul/testutil/retry" )