From cc02c26af5dd3bee071e0de40ad2907f2a9643d1 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 11 Dec 2018 15:04:02 -0500 Subject: [PATCH] Fix tests --- builtin/logical/ssh/path_config_ca_test.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/builtin/logical/ssh/path_config_ca_test.go b/builtin/logical/ssh/path_config_ca_test.go index 1230b491d901..f77852c1cb7d 100644 --- a/builtin/logical/ssh/path_config_ca_test.go +++ b/builtin/logical/ssh/path_config_ca_test.go @@ -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 @@ -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