From d7a404f2ee168f82f7454e7cb004001436721156 Mon Sep 17 00:00:00 2001 From: Freddy Date: Tue, 28 Aug 2018 12:37:34 -0400 Subject: [PATCH] Bugfix: Use "%#v" when formatting structs (#4600) --- agent/consul/state/catalog_test.go | 4 ++-- testrpc/wait.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/consul/state/catalog_test.go b/agent/consul/state/catalog_test.go index bc2f79fdcf..7b2ec445ce 100644 --- a/agent/consul/state/catalog_test.go +++ b/agent/consul/state/catalog_test.go @@ -61,7 +61,7 @@ func TestStateStore_GetNodeID(t *testing.T) { t.Fatalf("got err %s want nil", err) } 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 _, 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) } 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) } } diff --git a/testrpc/wait.go b/testrpc/wait.go index b0e6e2ec0e..3019eba789 100644 --- a/testrpc/wait.go +++ b/testrpc/wait.go @@ -32,7 +32,7 @@ func WaitUntilNoLeader(t *testing.T, rpc rpcFn, dc string) { retry.Run(t, func(r *retry.R) { args := &structs.DCSpecificRequest{Datacenter: dc} 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 { r.Fatalf("Has still a leader")