Include Principals and Grants on Roles When Updating the Role. (#203)

This commit is contained in:
Todd Knight authored and GitHub committed 2020-07-17 09:31:10 -07:00
1 parent 99653727bb
commit 5bb13e71fe
6 files changed
+182 -38

No files matched your search

+2 -2
View File
@@ -112,14 +112,14 @@ func TestCustom(t *testing.T) {
require.NoError(err)
require.Nil(apiErr, "Got error ", apiErr)
assert.Equal(t, updatedRole.Version, r.Version+1)
assert.Contains(t, updatedRole.Grants, "id=*;actions=read")
assert.Contains(t, updatedRole.GrantStrings, "id=*;actions=read")
r = updatedRole
updatedRole, apiErr, err = r.SetGrants(ctx, []string{"id=*;actions=*"})
require.NoError(err)
require.Nil(apiErr, "Got error ", apiErr)
assert.Equal(t, updatedRole.Version, r.Version+1)
assert.Contains(t, updatedRole.Grants, "id=*;actions=*")
assert.Contains(t, updatedRole.GrantStrings, "id=*;actions=*")
r = updatedRole
updatedRole, apiErr, err = r.RemoveGrants(ctx, []string{"id=*;actions=*"})