Skip to content

Commit

Permalink
fix dropped errors in external_tests (hashicorp#11947)
Browse files Browse the repository at this point in the history
* vault/external_tests/token: fix dropped test error

* vault/external_tests/identity: fix dropped test errors
  • Loading branch information
alrs authored and jartek committed Sep 11, 2021
1 parent d0192dc commit bad1eb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vault/external_tests/identity/identity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func TestIdentityStore_ExternalGroupMemberships_DifferentMounts(t *testing.T) {
"canonical_id": groupID,
"mount_accessor": accessor,
})
require.NoError(t, err)

// Create a user in Vault
_, err = client.Logical().Write("auth/"+path+"/users/hermes conrad", map[string]interface{}{
Expand Down Expand Up @@ -129,6 +130,7 @@ func TestIdentityStore_ExternalGroupMemberships_DifferentMounts(t *testing.T) {
secret, err = client.Logical().Write("auth/ldap/login/hermes conrad", map[string]interface{}{
"password": "hermes",
})
require.NoError(t, err)

secret, err = client.Logical().Read("identity/group/id/" + groupID1)
require.NoError(t, err)
Expand Down
3 changes: 3 additions & 0 deletions vault/external_tests/token/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ func TestTokenStore_RevocationOnStartup(t *testing.T) {
// Fake times in the past
for _, lease := range leases {
secret, err = client.Logical().Read(leasePath + lease.(string))
if err != nil {
t.Fatal(err)
}
var entry leaseEntry
if err := jsonutil.DecodeJSON([]byte(secret.Data["value"].(string)), &entry); err != nil {
t.Fatal(err)
Expand Down

0 comments on commit bad1eb7

Please sign in to comment.