From 5312f7d042a87c6be9d01adcaff9387801c82cba Mon Sep 17 00:00:00 2001 From: Jim Date: Mon, 20 Sep 2021 11:42:04 -0400 Subject: [PATCH] fix (credential/vault): Correct typo in error msg (#1547) * fix (credential/vault): Correct typo in error msg * test (vault): Add missing assertion --- internal/credential/vault/vault.go | 2 +- internal/credential/vault/vault_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/credential/vault/vault.go b/internal/credential/vault/vault.go index a12592199..9f29c6f95 100644 --- a/internal/credential/vault/vault.go +++ b/internal/credential/vault/vault.go @@ -96,7 +96,7 @@ func (c *client) ping() error { case err != nil: return errors.WrapDeprecated(err, op, errors.WithCode(errors.Unknown), errors.WithMsg(fmt.Sprintf("vault: %s", c.cl.Address()))) case h == nil: - return errors.NewDeprecated(errors.Unavailable, op, fmt.Sprintf("no repsonse: vault: %s", c.cl.Address())) + return errors.NewDeprecated(errors.Unavailable, op, fmt.Sprintf("no response: vault: %s", c.cl.Address())) case !h.Initialized || h.Sealed: return errors.NewDeprecated(errors.Unavailable, op, fmt.Sprintf("vault (%s): initialized: %t, sealed: %t ", c.cl.Address(), h.Initialized, h.Sealed)) } diff --git a/internal/credential/vault/vault_test.go b/internal/credential/vault/vault_test.go index 2852657f9..8e8f69882 100644 --- a/internal/credential/vault/vault_test.go +++ b/internal/credential/vault/vault_test.go @@ -94,6 +94,7 @@ func TestClient_RevokeToken(t *testing.T) { // An attempt to lookup should now fail with a 403 tokenLookup, err = client.lookupToken() require.Error(err) + assert.Nil(tokenLookup) var respErr *vault.ResponseError ok := errors.As(err, &respErr)