Skip to content
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
Prev Previous commit
Next Next commit
linting
  • Loading branch information
Emyrk committed Sep 17, 2024
commit c04801986dcab2638ca1d267b7218427f71944c3
6 changes: 6 additions & 0 deletions enterprise/cli/organizationsettings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
t.Parallel()

t.Run("OK", func(t *testing.T) {
t.Parallel()

dv := coderdtest.DeploymentValues(t)
dv.Experiments = []string{string(codersdk.ExperimentMultiOrganization)}

Expand All @@ -38,6 +40,7 @@

ctx := testutil.Context(t, testutil.WaitLong)
inv, root := clitest.New(t, "organization", "settings", "set", "groupsync")
//nolint:gocritic // Using the owner, testing the cli not perms
clitest.SetupConfig(t, owner, root)

expectedSettings := codersdk.GroupSyncSettings{
Expand Down Expand Up @@ -75,6 +78,8 @@
t.Parallel()

t.Run("OK", func(t *testing.T) {
t.Parallel()

dv := coderdtest.DeploymentValues(t)
dv.Experiments = []string{string(codersdk.ExperimentMultiOrganization)}

Expand All @@ -91,7 +96,7 @@

ctx := testutil.Context(t, testutil.WaitLong)
inv, root := clitest.New(t, "organization", "settings", "set", "rolesync")
clitest.SetupConfig(t, owner, root)

Check failure on line 99 in enterprise/cli/organizationsettings_test.go

View workflow job for this annotation

GitHub Actions / lint

ruleguard: The CLI will be operating as the owner user, which has unrestricted permissions. Consider creating a different user. (gocritic)

expectedSettings := codersdk.RoleSyncSettings{
Field: "roles",
Expand All @@ -111,6 +116,7 @@

// Now read it back
inv, root = clitest.New(t, "organization", "settings", "show", "rolesync")
//nolint:gocritic // Using the owner, testing the cli not perms
clitest.SetupConfig(t, owner, root)

buf = new(bytes.Buffer)
Expand Down
Loading