(t *testing.T)
| 17 | ) |
| 18 | |
| 19 | func TestExpandCustomRoleRoles(t *testing.T) { |
| 20 | t.Parallel() |
| 21 | |
| 22 | db, _ := dbtestutil.NewDB(t) |
| 23 | |
| 24 | org := dbgen.Organization(t, db, database.Organization{}) |
| 25 | |
| 26 | const roleName = "test-role" |
| 27 | dbgen.CustomRole(t, db, database.CustomRole{ |
| 28 | Name: roleName, |
| 29 | DisplayName: "", |
| 30 | SitePermissions: nil, |
| 31 | OrgPermissions: nil, |
| 32 | UserPermissions: nil, |
| 33 | OrganizationID: uuid.NullUUID{ |
| 34 | UUID: org.ID, |
| 35 | Valid: true, |
| 36 | }, |
| 37 | }) |
| 38 | |
| 39 | ctx := testutil.Context(t, testutil.WaitShort) |
| 40 | roles, err := rolestore.Expand(ctx, db, []rbac.RoleIdentifier{{Name: roleName, OrganizationID: org.ID}}) |
| 41 | require.NoError(t, err) |
| 42 | require.Len(t, roles, 1, "role found") |
| 43 | } |
| 44 | |
| 45 | func TestReconcileSystemRole(t *testing.T) { |
| 46 | t.Parallel() |
nothing calls this directly
no test coverage detected