Move argument structs back in original position

pull/136/head
William Tisäter 11 years ago
parent 93c7103bb5
commit 05243b35cd

@ -20,16 +20,14 @@ func TestCatalogRegister(t *testing.T) {
testutil.WaitForLeader(t, srv.agent.RPC)
// Register node
args := &structs.RegisterRequest{
Datacenter: "dc1",
Node: "foo",
Address: "127.0.0.1",
}
req, err := http.NewRequest("GET", "/v1/catalog/register", nil)
if err != nil {
t.Fatalf("err: %v", err)
}
args := &structs.RegisterRequest{
Node: "foo",
Address: "127.0.0.1",
}
req.Body = encodeReq(args)
obj, err := srv.CatalogRegister(nil, req)
@ -52,15 +50,13 @@ func TestCatalogDeregister(t *testing.T) {
testutil.WaitForLeader(t, srv.agent.RPC)
// Register node
args := &structs.DeregisterRequest{
Datacenter: "dc1",
Node: "foo",
}
req, err := http.NewRequest("GET", "/v1/catalog/deregister", nil)
if err != nil {
t.Fatalf("err: %v", err)
}
args := &structs.DeregisterRequest{
Node: "foo",
}
req.Body = encodeReq(args)
obj, err := srv.CatalogDeregister(nil, req)

@ -257,11 +257,6 @@ func TestCatalogListNodes_StaleRaad(t *testing.T) {
testutil.WaitForLeader(t, client1.Call)
testutil.WaitForLeader(t, client2.Call)
args := structs.DCSpecificRequest{
Datacenter: "dc1",
QueryOptions: structs.QueryOptions{AllowStale: true},
}
// Use the follower as the client
var client *rpc.Client
if !s1.IsLeader() {
@ -276,6 +271,10 @@ func TestCatalogListNodes_StaleRaad(t *testing.T) {
s2.fsm.State().EnsureNode(1, structs.Node{"foo", "127.0.0.1"})
}
args := structs.DCSpecificRequest{
Datacenter: "dc1",
QueryOptions: structs.QueryOptions{AllowStale: true},
}
var out structs.IndexedNodes
if err := client.Call("Catalog.ListNodes", &args, &out); err != nil {
t.Fatalf("err: %v", err)

Loading…
Cancel
Save