mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove UpsertCustomRole in favor of Insert + Update (#14217)
* chore: remove UpsertCustomRole in favor of Insert + Update --------- Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
This commit is contained in:
co-authored by
Jaayden Halko
parent
712a1b50d8
commit
84fdfd2a18
@@ -94,7 +94,7 @@ func TestEnterpriseListOrganizationMembers(t *testing.T) {
|
||||
|
||||
ctx := testutil.Context(t, testutil.WaitMedium)
|
||||
//nolint:gocritic // only owners can patch roles
|
||||
customRole, err := ownerClient.PatchOrganizationRole(ctx, codersdk.Role{
|
||||
customRole, err := ownerClient.CreateOrganizationRole(ctx, codersdk.Role{
|
||||
Name: "custom",
|
||||
OrganizationID: owner.OrganizationID.String(),
|
||||
DisplayName: "Custom Role",
|
||||
@@ -147,7 +147,7 @@ func TestAssignOrganizationMemberRole(t *testing.T) {
|
||||
|
||||
ctx := testutil.Context(t, testutil.WaitMedium)
|
||||
// nolint:gocritic // requires owner role to create
|
||||
customRole, err := ownerClient.PatchOrganizationRole(ctx, codersdk.Role{
|
||||
customRole, err := ownerClient.CreateOrganizationRole(ctx, codersdk.Role{
|
||||
Name: "custom-role",
|
||||
OrganizationID: owner.OrganizationID.String(),
|
||||
DisplayName: "Custom Role",
|
||||
|
||||
@@ -168,7 +168,7 @@ func TestTemplateCreate(t *testing.T) {
|
||||
ctx := testutil.Context(t, testutil.WaitMedium)
|
||||
|
||||
//nolint:gocritic // owner required to make custom roles
|
||||
orgTemplateAdminRole, err := ownerClient.PatchOrganizationRole(ctx, codersdk.Role{
|
||||
orgTemplateAdminRole, err := ownerClient.CreateOrganizationRole(ctx, codersdk.Role{
|
||||
Name: "org-template-admin",
|
||||
OrganizationID: secondOrg.ID.String(),
|
||||
OrganizationPermissions: codersdk.CreatePermissions(map[codersdk.RBACResource][]codersdk.RBACAction{
|
||||
|
||||
Reference in New Issue
Block a user