Skip to content

Commit

Permalink
fix swallowed errors in pki package tests (#3215)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs authored and jefferai committed Aug 29, 2017
1 parent 76e3ffc commit 56f1273
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builtin/logical/pki/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down

0 comments on commit 56f1273

Please sign in to comment.