agent: remove unused code
This commit is contained in:
parent
37202cc751
commit
33588d8fdd
|
@ -2681,8 +2681,6 @@ func TestPreparedQuery_Wrapper(t *testing.T) {
|
|||
})
|
||||
defer os.RemoveAll(dir1)
|
||||
defer s1.Shutdown()
|
||||
codec1 := rpcClient(t, s1)
|
||||
defer codec1.Close()
|
||||
|
||||
dir2, s2 := testServerWithConfig(t, func(c *Config) {
|
||||
c.Datacenter = "dc2"
|
||||
|
@ -2692,19 +2690,12 @@ func TestPreparedQuery_Wrapper(t *testing.T) {
|
|||
})
|
||||
defer os.RemoveAll(dir2)
|
||||
defer s2.Shutdown()
|
||||
codec2 := rpcClient(t, s2)
|
||||
defer codec2.Close()
|
||||
|
||||
testrpc.WaitForLeader(t, s1.RPC, "dc1")
|
||||
testrpc.WaitForLeader(t, s2.RPC, "dc2")
|
||||
|
||||
// Try to WAN join.
|
||||
joinWAN(t, s2, s1)
|
||||
retry.Run(t, func(r *retry.R) {
|
||||
if got, want := len(s1.WANMembers()), 2; got != want {
|
||||
r.Fatalf("got %d WAN members want %d", got, want)
|
||||
}
|
||||
})
|
||||
|
||||
// Try all the operations on a real server via the wrapper.
|
||||
wrapper := &queryServerWrapper{s1}
|
||||
|
|
|
@ -162,8 +162,6 @@ func TestTxn_Apply_ACLDeny(t *testing.T) {
|
|||
})
|
||||
defer os.RemoveAll(dir1)
|
||||
defer s1.Shutdown()
|
||||
codec := rpcClient(t, s1)
|
||||
defer codec.Close()
|
||||
|
||||
testrpc.WaitForLeader(t, s1.RPC, "dc1")
|
||||
|
||||
|
@ -190,7 +188,7 @@ func TestTxn_Apply_ACLDeny(t *testing.T) {
|
|||
},
|
||||
WriteRequest: structs.WriteRequest{Token: "root"},
|
||||
}
|
||||
if err := msgpackrpc.CallWithCodec(codec, "ACL.Apply", &arg, &id); err != nil {
|
||||
if err := s1.RPC("ACL.Apply", &arg, &id); err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
}
|
||||
|
@ -302,7 +300,7 @@ func TestTxn_Apply_ACLDeny(t *testing.T) {
|
|||
},
|
||||
}
|
||||
var out structs.TxnResponse
|
||||
if err := msgpackrpc.CallWithCodec(codec, "Txn.Apply", &arg, &out); err != nil {
|
||||
if err := s1.RPC("Txn.Apply", &arg, &out); err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue