Skip to content

chore: remove CreateAnotherUserWithUser #6068

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 1 commit into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion cli/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func TestCreate(t *testing.T) {
_ = coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID)
cmd, root := clitest.New(t, "create", "my-workspace", "-y")

member := coderdtest.CreateAnotherUser(t, client, user.OrganizationID)
member, _ := coderdtest.CreateAnotherUser(t, client, user.OrganizationID)
clitest.SetupConfig(t, member, root)
cmdCtx, done := context.WithTimeout(context.Background(), testutil.WaitLong)
go func() {
Expand Down
2 changes: 1 addition & 1 deletion cli/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestDelete(t *testing.T) {
adminClient := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
adminUser := coderdtest.CreateFirstUser(t, adminClient)
orgID := adminUser.OrganizationID
client := coderdtest.CreateAnotherUser(t, adminClient, orgID)
client, _ := coderdtest.CreateAnotherUser(t, adminClient, orgID)
user, err := client.User(context.Background(), codersdk.Me)
require.NoError(t, err)

Expand Down
7 changes: 2 additions & 5 deletions cli/userlist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,9 @@ func TestUserShow(t *testing.T) {

t.Run("Table", func(t *testing.T) {
t.Parallel()
ctx := context.Background()
client := coderdtest.New(t, nil)
admin := coderdtest.CreateFirstUser(t, client)
other := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
otherUser, err := other.User(ctx, codersdk.Me)
require.NoError(t, err, "fetch other user")
_, otherUser := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
cmd, root := clitest.New(t, "users", "show", otherUser.Username)
clitest.SetupConfig(t, client, root)
doneChan := make(chan struct{})
Expand All @@ -114,7 +111,7 @@ func TestUserShow(t *testing.T) {
ctx := context.Background()
client := coderdtest.New(t, nil)
admin := coderdtest.CreateFirstUser(t, client)
other := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
other, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
otherUser, err := other.User(ctx, codersdk.Me)
require.NoError(t, err, "fetch other user")
cmd, root := clitest.New(t, "users", "show", otherUser.Username, "-o", "json")
Expand Down
2 changes: 1 addition & 1 deletion cli/userstatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestUserStatus(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
admin := coderdtest.CreateFirstUser(t, client)
other := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
other, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
otherUser, err := other.User(context.Background(), codersdk.Me)
require.NoError(t, err, "fetch user")

Expand Down
2 changes: 1 addition & 1 deletion coderd/apikey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestSessionExpiry(t *testing.T) {
// this test it works because we don't copy the value (and we use pointers).
dc.SessionDuration.Value = time.Second

userClient := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)
userClient, _ := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)

// Find the session cookie, and ensure it has the correct expiry.
token := userClient.SessionToken()
Expand Down
4 changes: 2 additions & 2 deletions coderd/authorize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func TestCheckPermissions(t *testing.T) {
})
// Create adminClient, member, and org adminClient
adminUser := coderdtest.CreateFirstUser(t, adminClient)
memberClient := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)
memberClient, _ := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)
memberUser, err := memberClient.User(ctx, codersdk.Me)
require.NoError(t, err)
orgAdminClient := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID, rbac.RoleOrgAdmin(adminUser.OrganizationID))
orgAdminClient, _ := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID, rbac.RoleOrgAdmin(adminUser.OrganizationID))
orgAdminUser, err := orgAdminClient.User(ctx, codersdk.Me)
require.NoError(t, err)

Expand Down
7 changes: 1 addition & 6 deletions coderd/coderdtest/coderdtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,7 @@ func CreateFirstUser(t *testing.T, client *codersdk.Client) codersdk.CreateFirst
}

// CreateAnotherUser creates and authenticates a new user.
func CreateAnotherUser(t *testing.T, client *codersdk.Client, organizationID uuid.UUID, roles ...string) *codersdk.Client {
userClient, _ := createAnotherUserRetry(t, client, organizationID, 5, roles...)
return userClient
}

func CreateAnotherUserWithUser(t *testing.T, client *codersdk.Client, organizationID uuid.UUID, roles ...string) (*codersdk.Client, codersdk.User) {
func CreateAnotherUser(t *testing.T, client *codersdk.Client, organizationID uuid.UUID, roles ...string) (*codersdk.Client, codersdk.User) {
return createAnotherUserRetry(t, client, organizationID, 5, roles...)
}

Expand Down
2 changes: 1 addition & 1 deletion coderd/organizations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestOrganizationByUserAndName(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
first := coderdtest.CreateFirstUser(t, client)
other := coderdtest.CreateAnotherUser(t, client, first.OrganizationID)
other, _ := coderdtest.CreateAnotherUser(t, client, first.OrganizationID)

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
Expand Down
4 changes: 2 additions & 2 deletions coderd/roles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ func TestListRoles(t *testing.T) {
client := coderdtest.New(t, nil)
// Create admin, member, and org admin
admin := coderdtest.CreateFirstUser(t, client)
member := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
orgAdmin := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID, rbac.RoleOrgAdmin(admin.OrganizationID))
member, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
orgAdmin, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID, rbac.RoleOrgAdmin(admin.OrganizationID))

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
t.Cleanup(cancel)
Expand Down
2 changes: 1 addition & 1 deletion coderd/templateversions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestTemplateVersion(t *testing.T) {

ctx, _ := testutil.Context(t)

client1, _ := coderdtest.CreateAnotherUserWithUser(t, client, user.OrganizationID)
client1, _ := coderdtest.CreateAnotherUser(t, client, user.OrganizationID)

_, err := client1.TemplateVersion(ctx, version.ID)
require.NoError(t, err)
Expand Down
36 changes: 18 additions & 18 deletions coderd/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func TestPostLogin(t *testing.T) {
numLogs++ // add an audit log for create user
numLogs++ // add an audit log for login

member := coderdtest.CreateAnotherUser(t, client, first.OrganizationID)
member, _ := coderdtest.CreateAnotherUser(t, client, first.OrganizationID)
numLogs++ // add an audit log for create user

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
Expand Down Expand Up @@ -302,7 +302,7 @@ func TestDeleteUser(t *testing.T) {
t.Parallel()
api := coderdtest.New(t, nil)
user := coderdtest.CreateFirstUser(t, api)
_, another := coderdtest.CreateAnotherUserWithUser(t, api, user.OrganizationID)
_, another := coderdtest.CreateAnotherUser(t, api, user.OrganizationID)
err := api.DeleteUser(context.Background(), another.ID)
require.NoError(t, err)
// Attempt to create a user with the same email and username, and delete them again.
Expand All @@ -320,7 +320,7 @@ func TestDeleteUser(t *testing.T) {
t.Parallel()
api := coderdtest.New(t, nil)
firstUser := coderdtest.CreateFirstUser(t, api)
client, _ := coderdtest.CreateAnotherUserWithUser(t, api, firstUser.OrganizationID)
client, _ := coderdtest.CreateAnotherUser(t, api, firstUser.OrganizationID)
err := client.DeleteUser(context.Background(), firstUser.UserID)
var apiErr *codersdk.Error
require.ErrorAs(t, err, &apiErr)
Expand All @@ -330,7 +330,7 @@ func TestDeleteUser(t *testing.T) {
t.Parallel()
client, _ := coderdtest.NewWithProvisionerCloser(t, nil)
user := coderdtest.CreateFirstUser(t, client)
anotherClient, another := coderdtest.CreateAnotherUserWithUser(t, client, user.OrganizationID)
anotherClient, another := coderdtest.CreateAnotherUser(t, client, user.OrganizationID)
version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil)
coderdtest.AwaitTemplateVersionJob(t, client, version.ID)
template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID)
Expand Down Expand Up @@ -452,8 +452,8 @@ func TestPostUsers(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
first := coderdtest.CreateFirstUser(t, client)
notInOrg := coderdtest.CreateAnotherUser(t, client, first.OrganizationID)
other := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, rbac.RoleOwner(), rbac.RoleMember())
notInOrg, _ := coderdtest.CreateAnotherUser(t, client, first.OrganizationID)
other, _ := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, rbac.RoleOwner(), rbac.RoleMember())

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
Expand Down Expand Up @@ -511,7 +511,7 @@ func TestPostUsers(t *testing.T) {
firstUser, err := client.User(ctx, firstUserResp.UserID.String())
require.NoError(t, err)

_ = coderdtest.CreateAnotherUser(t, client, firstUserResp.OrganizationID)
_, _ = coderdtest.CreateAnotherUser(t, client, firstUserResp.OrganizationID)

allUsersRes, err := client.Users(ctx, codersdk.UsersRequest{})
require.NoError(t, err)
Expand Down Expand Up @@ -605,7 +605,7 @@ func TestUpdateUserPassword(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
admin := coderdtest.CreateFirstUser(t, client)
member := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
member, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
Expand Down Expand Up @@ -652,7 +652,7 @@ func TestUpdateUserPassword(t *testing.T) {
numLogs++ // add an audit log for user create
numLogs++ // add an audit log for login

member := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
member, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
numLogs++ // add an audit log for user create

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
Expand All @@ -673,7 +673,7 @@ func TestUpdateUserPassword(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
admin := coderdtest.CreateFirstUser(t, client)
member := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
member, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
Expand Down Expand Up @@ -784,14 +784,14 @@ func TestGrantSiteRoles(t *testing.T) {

admin := coderdtest.New(t, nil)
first := coderdtest.CreateFirstUser(t, admin)
member := coderdtest.CreateAnotherUser(t, admin, first.OrganizationID)
orgAdmin := coderdtest.CreateAnotherUser(t, admin, first.OrganizationID, rbac.RoleOrgAdmin(first.OrganizationID))
member, _ := coderdtest.CreateAnotherUser(t, admin, first.OrganizationID)
orgAdmin, _ := coderdtest.CreateAnotherUser(t, admin, first.OrganizationID, rbac.RoleOrgAdmin(first.OrganizationID))
randOrg, err := admin.CreateOrganization(ctx, codersdk.CreateOrganizationRequest{
Name: "random",
})
require.NoError(t, err)
_, randOrgUser := coderdtest.CreateAnotherUserWithUser(t, admin, randOrg.ID, rbac.RoleOrgAdmin(randOrg.ID))
userAdmin := coderdtest.CreateAnotherUser(t, admin, first.OrganizationID, rbac.RoleUserAdmin())
_, randOrgUser := coderdtest.CreateAnotherUser(t, admin, randOrg.ID, rbac.RoleOrgAdmin(randOrg.ID))
userAdmin, _ := coderdtest.CreateAnotherUser(t, admin, first.OrganizationID, rbac.RoleUserAdmin())

const newUser = "newUser"

Expand Down Expand Up @@ -901,7 +901,7 @@ func TestGrantSiteRoles(t *testing.T) {
if c.OrgID != uuid.Nil {
orgID = c.OrgID
}
_, newUser := coderdtest.CreateAnotherUserWithUser(t, admin, orgID)
_, newUser := coderdtest.CreateAnotherUser(t, admin, orgID)
c.AssignToUser = newUser.ID.String()
}

Expand Down Expand Up @@ -962,7 +962,7 @@ func TestPutUserSuspend(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
me := coderdtest.CreateFirstUser(t, client)
_, user := coderdtest.CreateAnotherUserWithUser(t, client, me.OrganizationID, rbac.RoleOwner())
_, user := coderdtest.CreateAnotherUser(t, client, me.OrganizationID, rbac.RoleOwner())

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
Expand All @@ -981,7 +981,7 @@ func TestPutUserSuspend(t *testing.T) {
numLogs++ // add an audit log for user create
numLogs++ // add an audit log for login

_, user := coderdtest.CreateAnotherUserWithUser(t, client, me.OrganizationID)
_, user := coderdtest.CreateAnotherUser(t, client, me.OrganizationID)
numLogs++ // add an audit log for user create

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
Expand Down Expand Up @@ -1085,7 +1085,7 @@ func TestUsersFilter(t *testing.T) {
if i%3 == 0 {
roles = append(roles, "auditor")
}
userClient := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, roles...)
userClient, _ := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, roles...)
user, err := userClient.User(ctx, codersdk.Me)
require.NoError(t, err, "fetch me")

Expand Down
4 changes: 2 additions & 2 deletions coderd/workspaceapps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func TestWorkspaceAppsProxyPath(t *testing.T) {
t.Run("NoAccessShould404", func(t *testing.T) {
t.Parallel()

userClient := coderdtest.CreateAnotherUser(t, client, firstUser.OrganizationID, rbac.RoleMember())
userClient, _ := coderdtest.CreateAnotherUser(t, client, firstUser.OrganizationID, rbac.RoleMember())
userClient.HTTPClient.CheckRedirect = client.HTTPClient.CheckRedirect
userClient.HTTPClient.Transport = client.HTTPClient.Transport

Expand Down Expand Up @@ -765,7 +765,7 @@ func TestWorkspaceAppsProxySubdomain(t *testing.T) {
t.Run("NoAccessShould401", func(t *testing.T) {
t.Parallel()

userClient := coderdtest.CreateAnotherUser(t, client, firstUser.OrganizationID, rbac.RoleMember())
userClient, _ := coderdtest.CreateAnotherUser(t, client, firstUser.OrganizationID, rbac.RoleMember())
userClient.HTTPClient.CheckRedirect = client.HTTPClient.CheckRedirect
userClient.HTTPClient.Transport = client.HTTPClient.Transport

Expand Down
8 changes: 3 additions & 5 deletions coderd/workspacebuilds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,11 @@ func TestWorkspaceBuilds(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true})
first := coderdtest.CreateFirstUser(t, client)
second := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, "owner")
second, secondUser := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, "owner")

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()

secondUser, err := second.User(ctx, codersdk.Me)
require.NoError(t, err, "fetch me")
version := coderdtest.CreateTemplateVersion(t, client, first.OrganizationID, nil)
template := coderdtest.CreateTemplate(t, client, first.OrganizationID, version.ID)
coderdtest.AwaitTemplateVersionJob(t, client, version.ID)
Expand Down Expand Up @@ -307,7 +305,7 @@ func TestWorkspaceBuildsProvisionerState(t *testing.T) {

// A regular user on the very same template must not be able to modify the
// state.
regularUser := coderdtest.CreateAnotherUser(t, client, first.OrganizationID)
regularUser, _ := coderdtest.CreateAnotherUser(t, client, first.OrganizationID)

workspace = coderdtest.CreateWorkspace(t, regularUser, first.OrganizationID, template.ID)
coderdtest.AwaitWorkspaceBuildJob(t, regularUser, workspace.LatestBuild.ID)
Expand Down Expand Up @@ -425,7 +423,7 @@ func TestPatchCancelWorkspaceBuild(t *testing.T) {
coderdtest.AwaitTemplateVersionJob(t, client, version.ID)
template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)

userClient := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
userClient, _ := coderdtest.CreateAnotherUser(t, client, owner.OrganizationID)
workspace := coderdtest.CreateWorkspace(t, userClient, owner.OrganizationID, template.ID)
var build codersdk.WorkspaceBuild

Expand Down
11 changes: 5 additions & 6 deletions coderd/workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func TestAdminViewAllWorkspaces(t *testing.T) {

// This other user is not in the first user's org. Since other is an admin, they can
// still see the "first" user's workspace.
otherOwner := coderdtest.CreateAnotherUser(t, client, otherOrg.ID, rbac.RoleOwner())
otherOwner, _ := coderdtest.CreateAnotherUser(t, client, otherOrg.ID, rbac.RoleOwner())
otherWorkspaces, err := otherOwner.Workspaces(ctx, codersdk.WorkspaceFilter{})
require.NoError(t, err, "(other) fetch workspaces")

Expand All @@ -185,7 +185,7 @@ func TestAdminViewAllWorkspaces(t *testing.T) {
require.ElementsMatch(t, otherWorkspaces.Workspaces, firstWorkspaces.Workspaces)
require.Equal(t, len(firstWorkspaces.Workspaces), 1, "should be 1 workspace present")

memberView := coderdtest.CreateAnotherUser(t, client, otherOrg.ID)
memberView, _ := coderdtest.CreateAnotherUser(t, client, otherOrg.ID)
memberViewWorkspaces, err := memberView.Workspaces(ctx, codersdk.WorkspaceFilter{})
require.NoError(t, err, "(member) fetch workspaces")
require.Equal(t, 0, len(memberViewWorkspaces.Workspaces), "member in other org should see 0 workspaces")
Expand Down Expand Up @@ -216,7 +216,7 @@ func TestPostWorkspacesByOrganization(t *testing.T) {
client := coderdtest.New(t, nil)
first := coderdtest.CreateFirstUser(t, client)

other := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, rbac.RoleMember(), rbac.RoleOwner())
other, _ := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, rbac.RoleMember(), rbac.RoleOwner())

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
Expand Down Expand Up @@ -510,11 +510,10 @@ func TestWorkspaceFilter(t *testing.T) {

users := make([]coderUser, 0)
for i := 0; i < 10; i++ {
userClient := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, rbac.RoleOwner())
user, err := userClient.User(ctx, codersdk.Me)
require.NoError(t, err, "fetch me")
userClient, user := coderdtest.CreateAnotherUser(t, client, first.OrganizationID, rbac.RoleOwner())

if i%3 == 0 {
var err error
user, err = client.UpdateUserProfile(ctx, user.ID.String(), codersdk.UpdateUserProfileRequest{
Username: strings.ToUpper(user.Username),
})
Expand Down
6 changes: 3 additions & 3 deletions enterprise/cli/groupedit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ func TestGroupEdit(t *testing.T) {
})

ctx, _ := testutil.Context(t)
_, user1 := coderdtest.CreateAnotherUserWithUser(t, client, admin.OrganizationID)
_, user2 := coderdtest.CreateAnotherUserWithUser(t, client, admin.OrganizationID)
_, user3 := coderdtest.CreateAnotherUserWithUser(t, client, admin.OrganizationID)
_, user1 := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
_, user2 := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
_, user3 := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)

group, err := client.CreateGroup(ctx, admin.OrganizationID, codersdk.CreateGroupRequest{
Name: "alpha",
Expand Down
4 changes: 2 additions & 2 deletions enterprise/cli/grouplist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func TestGroupList(t *testing.T) {
})

ctx, _ := testutil.Context(t)
_, user1 := coderdtest.CreateAnotherUserWithUser(t, client, admin.OrganizationID)
_, user2 := coderdtest.CreateAnotherUserWithUser(t, client, admin.OrganizationID)
_, user1 := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
_, user2 := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)

// We intentionally create the first group as beta so that we
// can assert that things are being sorted by name intentionally
Expand Down
2 changes: 1 addition & 1 deletion enterprise/coderd/appearance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestServiceBanners(t *testing.T) {
require.NoError(t, err)
require.False(t, sb.ServiceBanner.Enabled)

basicUserClient := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)
basicUserClient, _ := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)

// Regular user should be unable to set the banner
sb.ServiceBanner.Enabled = true
Expand Down
4 changes: 2 additions & 2 deletions enterprise/coderd/authorize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ func TestCheckACLPermissions(t *testing.T) {
},
})

memberClient := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)
memberClient, _ := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID)
memberUser, err := memberClient.User(ctx, codersdk.Me)
require.NoError(t, err)
orgAdminClient := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID, rbac.RoleOrgAdmin(adminUser.OrganizationID))
orgAdminClient, _ := coderdtest.CreateAnotherUser(t, adminClient, adminUser.OrganizationID, rbac.RoleOrgAdmin(adminUser.OrganizationID))
orgAdminUser, err := orgAdminClient.User(ctx, codersdk.Me)
require.NoError(t, err)

Expand Down
Loading