fix (credential/vault): Correct typo in error msg (#1547)

* fix (credential/vault): Correct typo in error msg

* test (vault): Add missing assertion
This commit is contained in:
Jim authored and GitHub committed 2021-09-20 11:42:04 -04:00
1 parent 6000f20ae5
commit 5312f7d042
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -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))
}
+1
View File
@@ -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)