mirror of https://github.com/status-im/consul.git
Bugfix: Use "%#v" when formatting structs (#4600)
This commit is contained in:
parent
82f9e48a18
commit
d7a404f2ee
|
@ -61,7 +61,7 @@ func TestStateStore_GetNodeID(t *testing.T) {
|
||||||
t.Fatalf("got err %s want nil", err)
|
t.Fatalf("got err %s want nil", err)
|
||||||
}
|
}
|
||||||
if out == nil || out.ID != nodeID {
|
if out == nil || out.ID != nodeID {
|
||||||
t.Fatalf("out should not be nil and contain nodeId, but was:=%#q", out)
|
t.Fatalf("out should not be nil and contain nodeId, but was:=%#v", out)
|
||||||
}
|
}
|
||||||
// Case insensitive lookup should work as well
|
// Case insensitive lookup should work as well
|
||||||
_, out, err = s.GetNodeID(types.NodeID("00a916bC-a357-4a19-b886-59419fceeAAA"))
|
_, out, err = s.GetNodeID(types.NodeID("00a916bC-a357-4a19-b886-59419fceeAAA"))
|
||||||
|
@ -69,7 +69,7 @@ func TestStateStore_GetNodeID(t *testing.T) {
|
||||||
t.Fatalf("got err %s want nil", err)
|
t.Fatalf("got err %s want nil", err)
|
||||||
}
|
}
|
||||||
if out == nil || out.ID != nodeID {
|
if out == nil || out.ID != nodeID {
|
||||||
t.Fatalf("out should not be nil and contain nodeId, but was:=%#q", out)
|
t.Fatalf("out should not be nil and contain nodeId, but was:=%#v", out)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ func WaitUntilNoLeader(t *testing.T, rpc rpcFn, dc string) {
|
||||||
retry.Run(t, func(r *retry.R) {
|
retry.Run(t, func(r *retry.R) {
|
||||||
args := &structs.DCSpecificRequest{Datacenter: dc}
|
args := &structs.DCSpecificRequest{Datacenter: dc}
|
||||||
if err := rpc("Catalog.ListNodes", args, &out); err == nil {
|
if err := rpc("Catalog.ListNodes", args, &out); err == nil {
|
||||||
r.Fatalf("It still has a leader: %#q", out)
|
r.Fatalf("It still has a leader: %#v", out)
|
||||||
}
|
}
|
||||||
if out.QueryMeta.KnownLeader {
|
if out.QueryMeta.KnownLeader {
|
||||||
r.Fatalf("Has still a leader")
|
r.Fatalf("Has still a leader")
|
||||||
|
|
Loading…
Reference in New Issue