Remove redundant lines from coordinate test

pull/3622/head
Kyle Havlovitz 7 years ago
parent b0536a96cc
commit 021b2849c5
No known key found for this signature in database
GPG Key ID: 8A5E6B173056AD6C

@ -105,7 +105,6 @@ func (s *HTTPServer) CoordinateNode(resp http.ResponseWriter, req *http.Request)
var out structs.IndexedCoordinates var out structs.IndexedCoordinates
defer setMeta(resp, &out.QueryMeta) defer setMeta(resp, &out.QueryMeta)
if err := s.agent.RPC("Coordinate.Node", &args, &out); err != nil { if err := s.agent.RPC("Coordinate.Node", &args, &out); err != nil {
sort.Sort(&sorter{out.Coordinates})
return nil, err return nil, err
} }

@ -194,7 +194,7 @@ func TestCoordinate_Node(t *testing.T) {
} }
time.Sleep(300 * time.Millisecond) 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) req, _ = http.NewRequest("GET", "/v1/coordinate/node/foo?dc=dc1", nil)
resp = httptest.NewRecorder() resp = httptest.NewRecorder()
obj, err = a.srv.CoordinateNode(resp, req) obj, err = a.srv.CoordinateNode(resp, req)

@ -1,9 +1,8 @@
package api package api
import ( import (
"testing"
"strings" "strings"
"testing"
"github.com/hashicorp/consul/testutil/retry" "github.com/hashicorp/consul/testutil/retry"
) )

Loading…
Cancel
Save