From 56f127300d9dcb21c5165fc2c0a50e1d7593621d Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Tue, 29 Aug 2017 10:15:36 -0700 Subject: [PATCH] fix swallowed errors in pki package tests (#3215) --- builtin/logical/pki/backend_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/builtin/logical/pki/backend_test.go b/builtin/logical/pki/backend_test.go index 800495684e7a..e1795ae64f7f 100644 --- a/builtin/logical/pki/backend_test.go +++ b/builtin/logical/pki/backend_test.go @@ -2209,6 +2209,10 @@ func TestBackend_Root_Idempotentcy(t *testing.T) { t.Fatal("expected ca info") } resp, err = client.Logical().Read("pki/cert/ca_chain") + if err != nil { + t.Fatalf("error reading ca_chain: %v", err) + } + r1Data := resp.Data // Try again, make sure it's a 204 and same CA @@ -2222,6 +2226,9 @@ func TestBackend_Root_Idempotentcy(t *testing.T) { t.Fatal("expected no ca info") } resp, err = client.Logical().Read("pki/cert/ca_chain") + if err != nil { + t.Fatalf("error reading ca_chain: %v", err) + } r2Data := resp.Data if !reflect.DeepEqual(r1Data, r2Data) { t.Fatal("got different ca certs")