Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Dec 11, 2018
1 parent 737a26d commit cc02c26
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions builtin/logical/ssh/path_config_ca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ func TestSSH_ConfigCAUpdateDelete(t *testing.T) {

// Fail to overwrite it
resp, err = b.HandleRequest(context.Background(), caReq)
if err == nil {
t.Fatalf("expected an error")
if err != nil {
t.Fatal(err)
}
if !resp.IsError() {
t.Fatalf("expected an error, got %#v", *resp)
}

caReq.Operation = logical.DeleteOperation
Expand All @@ -142,8 +145,11 @@ func TestSSH_ConfigCAUpdateDelete(t *testing.T) {

// Fail to overwrite it
resp, err = b.HandleRequest(context.Background(), caReq)
if err == nil {
t.Fatalf("expected an error")
if err != nil {
t.Fatal(err)
}
if !resp.IsError() {
t.Fatalf("expected an error, got %#v", *resp)
}

caReq.Operation = logical.DeleteOperation
Expand Down

0 comments on commit cc02c26

Please sign in to comment.