Skip to content

test(coderd/rbac): Use static name for tests #7155

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

Merged
merged 2 commits into from
Apr 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test(coderd/rbac): Use static name for tests
These tests were spamming CI stats by using new names every time.
  • Loading branch information
mafredri committed Apr 17, 2023
commit c3bf6afe182f1696f63a56aa5df8e9fd619e2808
12 changes: 6 additions & 6 deletions coderd/rbac/roles_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ func TestRoleByName(t *testing.T) {
{Role: builtInRoles[userAdmin]("")},
{Role: builtInRoles[auditor]("")},

{Role: builtInRoles[orgAdmin](uuid.New().String())},
{Role: builtInRoles[orgAdmin](uuid.New().String())},
{Role: builtInRoles[orgAdmin](uuid.New().String())},
{Role: builtInRoles[orgAdmin]("4592dac5-0945-42fd-828d-a903957d3dbb")},
{Role: builtInRoles[orgAdmin]("24c100c5-1920-49c0-8c38-1b640ac4b38c")},
{Role: builtInRoles[orgAdmin]("4a00f697-0040-4079-b3ce-d24470281a62")},

{Role: builtInRoles[orgMember](uuid.New().String())},
{Role: builtInRoles[orgMember](uuid.New().String())},
{Role: builtInRoles[orgMember](uuid.New().String())},
{Role: builtInRoles[orgMember]("3293c50e-fa5d-414f-a461-01112a4dfb6f")},
{Role: builtInRoles[orgMember]("f88dd23d-bdbd-469d-b82e-36ee06c3d1e1")},
{Role: builtInRoles[orgMember]("02cfd2a5-016c-4d8d-8290-301f5f18023d")},
}

for _, c := range testCases {
Expand Down