mirror of
https://github.com/status-im/consul.git
synced 2025-02-19 17:14:37 +00:00
Remove redundant lines from coordinate test
This commit is contained in:
parent
b0536a96cc
commit
021b2849c5
@ -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…
x
Reference in New Issue
Block a user