Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(grants): tests for group associations #5443

Open
wants to merge 4 commits into
base: llb-normalized-grants
Choose a base branch
from

Conversation

dkanney
Copy link
Collaborator

@dkanney dkanney commented Jan 21, 2025

No description provided.

@dkanney dkanney force-pushed the dkanney-test-grants-for-user-group-associations branch 2 times, most recently from 9d2f5c3 to 6bdc21d Compare January 22, 2025 16:52
@dkanney dkanney force-pushed the dkanney-test-grants-for-user-group-associations branch from 6bdc21d to 34114df Compare January 22, 2025 21:52
@dkanney dkanney marked this pull request as ready for review January 22, 2025 21:54
@dkanney dkanney requested a review from a team as a code owner January 22, 2025 21:54
@dkanney dkanney requested review from tmessi, elimt and bosorawis January 22, 2025 22:56
repo := iam.TestRepo(t, conn, wrap)
kmsCache := kms.TestKms(t, conn, wrap)

grant := "ids=*;type=*;actions=*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the grant, if we're testing against the groups resource, we should set set the grant to look like ids=*;type=group;actions=*.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think we should have multiple grants and multiple roles so we can have multiple grantTuples and assert it's what we expect

internal/iam/repository_role_grant_test.go Show resolved Hide resolved
res: perms.Resource{
ScopeId: directGrantProj1a.PublicId,
Id: "cs_abcd1234",
Type: resource.Credential,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we hae dedicated tests for Groups resource

@dkanney dkanney force-pushed the dkanney-test-grants-for-user-group-associations branch from 34114df to 79b9462 Compare January 24, 2025 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants