8000 chore: add cli command to fetch group sync settings as json by Emyrk · Pull Request #14694 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: add cli command to fetch group sync settings as json #14694

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 9 commits into from
Sep 17, 2024
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
0