Skip to content

Commit e037fae

Browse files
committed
fix new linter complaints in userstatus_test.go
1 parent d3114cd commit e037fae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/userstatus_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99

1010
"github.com/coder/coder/v2/cli/clitest"
1111
"github.com/coder/coder/v2/coderd/coderdtest"
12+
"github.com/coder/coder/v2/coderd/rbac"
1213
"github.com/coder/coder/v2/codersdk"
1314
)
1415

@@ -36,12 +37,13 @@ func TestUserStatus(t *testing.T) {
3637

3738
client := coderdtest.New(t, nil)
3839
admin := coderdtest.CreateFirstUser(t, client)
40+
userAdmin, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID, rbac.RoleUserAdmin())
3941
other, _ := coderdtest.CreateAnotherUser(t, client, admin.OrganizationID)
4042
otherUser, err := other.User(context.Background(), codersdk.Me)
4143
require.NoError(t, err, "fetch user")
4244

4345
inv, root := clitest.New(t, "users", "suspend", otherUser.Username)
44-
clitest.SetupConfig(t, client, root)
46+
clitest.SetupConfig(t, userAdmin, root)
4547
// Yes to the prompt
4648
inv.Stdin = bytes.NewReader([]byte("yes\n"))
4749
err = inv.Run()
@@ -54,7 +56,7 @@ func TestUserStatus(t *testing.T) {
5456

5557
// Set back to active. Try using a uuid as well
5658
inv, root = clitest.New(t, "users", "activate", otherUser.ID.String())
57-
clitest.SetupConfig(t, client, root)
59+
clitest.SetupConfig(t, userAdmin, root)
5860
// Yes to the prompt
5961
inv.Stdin = bytes.NewReader([]byte("yes\n"))
6062
err = inv.Run()

0 commit comments

Comments
 (0)