From 820163dd7aa8254a85ab61b731b880a6146cd7be Mon Sep 17 00:00:00 2001 From: Denis Subbotin Date: Mon, 16 Mar 2020 18:57:35 +0300 Subject: [PATCH 1/3] replace error with silent ignoring call --- plugin/pki/path_venafi_cert_revoke.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/pki/path_venafi_cert_revoke.go b/plugin/pki/path_venafi_cert_revoke.go index 73a2e6e0..2d4cdbf8 100644 --- a/plugin/pki/path_venafi_cert_revoke.go +++ b/plugin/pki/path_venafi_cert_revoke.go @@ -30,5 +30,5 @@ func pathVenafiCertRevoke(b *backend) *framework.Path { } func (b *backend) venafiCertRevoke(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) { - return nil, fmt.Errorf("not implemented yet") + return nil, nil } From d8ce86a91dfbda2e4031b638bbf133c9ee22aa40 Mon Sep 17 00:00:00 2001 From: Denis Subbotin Date: Mon, 16 Mar 2020 19:08:25 +0300 Subject: [PATCH 2/3] remove unnecessary import --- plugin/pki/path_venafi_cert_revoke.go | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin/pki/path_venafi_cert_revoke.go b/plugin/pki/path_venafi_cert_revoke.go index 2d4cdbf8..ced61f0d 100644 --- a/plugin/pki/path_venafi_cert_revoke.go +++ b/plugin/pki/path_venafi_cert_revoke.go @@ -2,7 +2,6 @@ package pki import ( "context" - "fmt" "github.com/hashicorp/vault/logical" "github.com/hashicorp/vault/logical/framework" ) From 33945609e292867f769d06b864e5fda9ae63ea6e Mon Sep 17 00:00:00 2001 From: Denis Subbotin Date: Mon, 16 Mar 2020 19:25:43 +0300 Subject: [PATCH 3/3] change revoke test --- plugin/pki/env_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugin/pki/env_test.go b/plugin/pki/env_test.go index af2e196d..d21ab0ed 100644 --- a/plugin/pki/env_test.go +++ b/plugin/pki/env_test.go @@ -534,13 +534,9 @@ func (e *testEnv) RevokeCertificate(t *testing.T, certId string) { }, }) - if err == nil { - t.Fatalf("revoke path is not implemented yet and should return error") - } - if err.Error() != "not implemented yet" { - t.Fatalf("error message should be not implemented yet not %s", err) + if err != nil { + t.Fatal(err) } - } func makeConfig(configString venafiConfigString) (roleData map[string]interface{}, err error) {