diff --git a/cli/root_test.go b/cli/root_test.go index 85863b656a2aa..58297f9403acd 100644 --- a/cli/root_test.go +++ b/cli/root_test.go @@ -31,7 +31,8 @@ var updateGoldenFiles = flag.Bool("update", false, "update .golden files") //nolint:tparallel,paralleltest // These test sets env vars. func TestCommandHelp(t *testing.T) { commonEnv := map[string]string{ - "CODER_CONFIG_DIR": "/tmp/coder-cli-test-config", + "HOME": "~", + "CODER_CONFIG_DIR": "~/.config/coderv2", } type testCase struct { @@ -48,7 +49,7 @@ func TestCommandHelp(t *testing.T) { name: "coder server --help", cmd: []string{"server", "--help"}, env: map[string]string{ - "CODER_CACHE_DIRECTORY": "/tmp/coder-cli-test-cache", + "CODER_CACHE_DIRECTORY": "~/.cache/coder", }, }, { @@ -104,11 +105,19 @@ ExtractCommandPathsLoop: ctx, _ := testutil.Context(t) + tmpwd := "/" + if runtime.GOOS == "windows" { + tmpwd = "C:\\" + } + err := os.Chdir(tmpwd) var buf bytes.Buffer root, _ := clitest.New(t, tt.cmd...) root.SetOut(&buf) - err := root.ExecuteContext(ctx) + assert.NoError(t, err) + err = root.ExecuteContext(ctx) + err2 := os.Chdir(wd) require.NoError(t, err) + require.NoError(t, err2) got := buf.Bytes() // Remove CRLF newlines (Windows). @@ -116,7 +125,7 @@ ExtractCommandPathsLoop: // The `coder templates create --help` command prints the path // to the working directory (--directory flag default value). - got = bytes.ReplaceAll(got, []byte(wd), []byte("/tmp/coder-cli-test-workdir")) + got = bytes.ReplaceAll(got, []byte(fmt.Sprintf("%q", tmpwd)), []byte("\"[current directory]\"")) gf := filepath.Join("testdata", strings.Replace(tt.name, " ", "_", -1)+".golden") if *updateGoldenFiles { diff --git a/cli/testdata/coder_--help.golden b/cli/testdata/coder_--help.golden index aa6f82b6cba35..41c7a97978cfc 100644 --- a/cli/testdata/coder_--help.golden +++ b/cli/testdata/coder_--help.golden @@ -48,7 +48,7 @@ Workspace Commands: Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER -h, --help help for coder diff --git a/cli/testdata/coder_agent_--help.golden b/cli/testdata/coder_agent_--help.golden index ec5e1ab8273f4..2577cd660ed80 100644 --- a/cli/testdata/coder_agent_--help.golden +++ b/cli/testdata/coder_agent_--help.golden @@ -13,7 +13,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_config-ssh_--help.golden b/cli/testdata/coder_config-ssh_--help.golden index 00a85cea6421e..b088c8586bc5b 100644 --- a/cli/testdata/coder_config-ssh_--help.golden +++ b/cli/testdata/coder_config-ssh_--help.golden @@ -27,7 +27,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_create_--help.golden b/cli/testdata/coder_create_--help.golden index 52aaff8d1a053..6be1ea35363e0 100644 --- a/cli/testdata/coder_create_--help.golden +++ b/cli/testdata/coder_create_--help.golden @@ -23,7 +23,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_delete_--help.golden b/cli/testdata/coder_delete_--help.golden index f20dd64119f36..9b25a441eb247 100644 --- a/cli/testdata/coder_delete_--help.golden +++ b/cli/testdata/coder_delete_--help.golden @@ -14,7 +14,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_dotfiles_--help.golden b/cli/testdata/coder_dotfiles_--help.golden index 171fd895df27d..4db2317705566 100644 --- a/cli/testdata/coder_dotfiles_--help.golden +++ b/cli/testdata/coder_dotfiles_--help.golden @@ -17,7 +17,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_list_--help.golden b/cli/testdata/coder_list_--help.golden index bdfcaae539895..9dc78e7a685d7 100644 --- a/cli/testdata/coder_list_--help.golden +++ b/cli/testdata/coder_list_--help.golden @@ -16,7 +16,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_login_--help.golden b/cli/testdata/coder_login_--help.golden index f32395925538f..cbec6869dfa06 100644 --- a/cli/testdata/coder_login_--help.golden +++ b/cli/testdata/coder_login_--help.golden @@ -20,7 +20,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_logout_--help.golden b/cli/testdata/coder_logout_--help.golden index 26158557d024e..3714b020ea892 100644 --- a/cli/testdata/coder_logout_--help.golden +++ b/cli/testdata/coder_logout_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_port-forward_--help.golden b/cli/testdata/coder_port-forward_--help.golden index b825512cf953d..a61f2cb109b32 100644 --- a/cli/testdata/coder_port-forward_--help.golden +++ b/cli/testdata/coder_port-forward_--help.golden @@ -35,7 +35,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_publickey_--help.golden b/cli/testdata/coder_publickey_--help.golden index 7712d9a04855d..f8b8f169dec9f 100644 --- a/cli/testdata/coder_publickey_--help.golden +++ b/cli/testdata/coder_publickey_--help.golden @@ -14,7 +14,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_rename_--help.golden b/cli/testdata/coder_rename_--help.golden index a5e5111b294dc..54bf48b302eb4 100644 --- a/cli/testdata/coder_rename_--help.golden +++ b/cli/testdata/coder_rename_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_reset-password_--help.golden b/cli/testdata/coder_reset-password_--help.golden index f961be5bc41da..1a99639c5765e 100644 --- a/cli/testdata/coder_reset-password_--help.golden +++ b/cli/testdata/coder_reset-password_--help.golden @@ -10,7 +10,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_restart_--help.golden b/cli/testdata/coder_restart_--help.golden index 3c3f77766889b..afea82201ce55 100644 --- a/cli/testdata/coder_restart_--help.golden +++ b/cli/testdata/coder_restart_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_scaletest_--help.golden b/cli/testdata/coder_scaletest_--help.golden index 64f88810bdb89..8949adc8a5df0 100644 --- a/cli/testdata/coder_scaletest_--help.golden +++ b/cli/testdata/coder_scaletest_--help.golden @@ -14,7 +14,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_scaletest_cleanup_--help.golden b/cli/testdata/coder_scaletest_cleanup_--help.golden index 189780c0bc77b..a0a05274f36dd 100644 --- a/cli/testdata/coder_scaletest_cleanup_--help.golden +++ b/cli/testdata/coder_scaletest_cleanup_--help.golden @@ -16,7 +16,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_scaletest_create-workspaces_--help.golden b/cli/testdata/coder_scaletest_create-workspaces_--help.golden index 0a5fbdcccacf7..0c07f92735093 100644 --- a/cli/testdata/coder_scaletest_create-workspaces_--help.golden +++ b/cli/testdata/coder_scaletest_create-workspaces_--help.golden @@ -115,7 +115,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_schedule_--help.golden b/cli/testdata/coder_schedule_--help.golden index d29ef260e66f9..9018e6a2dede3 100644 --- a/cli/testdata/coder_schedule_--help.golden +++ b/cli/testdata/coder_schedule_--help.golden @@ -16,7 +16,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_schedule_override-stop_--help.golden b/cli/testdata/coder_schedule_override-stop_--help.golden index 0ec9897b6e3da..8e5827e4fe129 100644 --- a/cli/testdata/coder_schedule_override-stop_--help.golden +++ b/cli/testdata/coder_schedule_override-stop_--help.golden @@ -14,7 +14,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_schedule_show_--help.golden b/cli/testdata/coder_schedule_show_--help.golden index 86e65ff537bd9..3c2f4aba6e4e4 100644 --- a/cli/testdata/coder_schedule_show_--help.golden +++ b/cli/testdata/coder_schedule_show_--help.golden @@ -12,7 +12,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_schedule_start_--help.golden b/cli/testdata/coder_schedule_start_--help.golden index 0dd02ba1a3720..1a2c137d42571 100644 --- a/cli/testdata/coder_schedule_start_--help.golden +++ b/cli/testdata/coder_schedule_start_--help.golden @@ -21,7 +21,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_schedule_stop_--help.golden b/cli/testdata/coder_schedule_stop_--help.golden index bea7a4868f126..f5fad8ebd933c 100644 --- a/cli/testdata/coder_schedule_stop_--help.golden +++ b/cli/testdata/coder_schedule_stop_--help.golden @@ -22,7 +22,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_server_--help.golden b/cli/testdata/coder_server_--help.golden index 294844255db94..2cc3ca502f1e2 100644 --- a/cli/testdata/coder_server_--help.golden +++ b/cli/testdata/coder_server_--help.golden @@ -28,7 +28,7 @@ Flags: set, it will be used for compatibility with systemd. Consumes $CODER_CACHE_DIRECTORY (default - "/tmp/coder-cli-test-cache") + "~/.cache/coder") --dangerous-allow-path-app-sharing Allow workspace apps that are not served from subdomains to be shared. Path-based app sharing is DISABLED by default for @@ -307,7 +307,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_server_postgres-builtin-serve_--help.golden b/cli/testdata/coder_server_postgres-builtin-serve_--help.golden index 3783656fb6c58..1bc7fd2fce7dc 100644 --- a/cli/testdata/coder_server_postgres-builtin-serve_--help.golden +++ b/cli/testdata/coder_server_postgres-builtin-serve_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_server_postgres-builtin-url_--help.golden b/cli/testdata/coder_server_postgres-builtin-url_--help.golden index dafbff33ea737..6fe19269dc8fa 100644 --- a/cli/testdata/coder_server_postgres-builtin-url_--help.golden +++ b/cli/testdata/coder_server_postgres-builtin-url_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_show_--help.golden b/cli/testdata/coder_show_--help.golden index bfa4b19c03e5e..2f4f68c0d254c 100644 --- a/cli/testdata/coder_show_--help.golden +++ b/cli/testdata/coder_show_--help.golden @@ -8,7 +8,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_speedtest_--help.golden b/cli/testdata/coder_speedtest_--help.golden index 2697e4f6f3c90..fa8cb952a866c 100644 --- a/cli/testdata/coder_speedtest_--help.golden +++ b/cli/testdata/coder_speedtest_--help.golden @@ -12,7 +12,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_ssh_--help.golden b/cli/testdata/coder_ssh_--help.golden index 4a716fa5eda62..20f5673b7de4a 100644 --- a/cli/testdata/coder_ssh_--help.golden +++ b/cli/testdata/coder_ssh_--help.golden @@ -36,7 +36,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_start_--help.golden b/cli/testdata/coder_start_--help.golden index 32fab8f28ce4a..ced86097073c6 100644 --- a/cli/testdata/coder_start_--help.golden +++ b/cli/testdata/coder_start_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_state_--help.golden b/cli/testdata/coder_state_--help.golden index 106dca76212a4..af5833729ddd1 100644 --- a/cli/testdata/coder_state_--help.golden +++ b/cli/testdata/coder_state_--help.golden @@ -14,7 +14,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_state_pull_--help.golden b/cli/testdata/coder_state_pull_--help.golden index 254db8d328918..dcb7c9916e0d4 100644 --- a/cli/testdata/coder_state_pull_--help.golden +++ b/cli/testdata/coder_state_pull_--help.golden @@ -7,7 +7,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_state_push_--help.golden b/cli/testdata/coder_state_push_--help.golden index 273bbf8575e61..bb5a2c9a78367 100644 --- a/cli/testdata/coder_state_push_--help.golden +++ b/cli/testdata/coder_state_push_--help.golden @@ -7,7 +7,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_stop_--help.golden b/cli/testdata/coder_stop_--help.golden index 6cec091340b3c..63fe36c9d306c 100644 --- a/cli/testdata/coder_stop_--help.golden +++ b/cli/testdata/coder_stop_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_--help.golden b/cli/testdata/coder_templates_--help.golden index f014b33100fcd..cdbb0cda2ec15 100644 --- a/cli/testdata/coder_templates_--help.golden +++ b/cli/testdata/coder_templates_--help.golden @@ -37,7 +37,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_create_--help.golden b/cli/testdata/coder_templates_create_--help.golden index aebabdd55d1f5..0ca9259692326 100644 --- a/cli/testdata/coder_templates_create_--help.golden +++ b/cli/testdata/coder_templates_create_--help.golden @@ -7,7 +7,7 @@ Flags: --default-ttl duration Specify a default TTL for workspaces created from this template. (default 24h0m0s) -d, --directory string Specify the directory to create from, use '-' to read - tar from stdin (default "/tmp/coder-cli-test-workdir") + tar from stdin (default "[current directory]") -h, --help help for create --parameter-file string Specify a file path with parameter values. --provisioner-tag stringArray Specify a set of tags to target provisioner daemons. @@ -15,7 +15,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_delete_--help.golden b/cli/testdata/coder_templates_delete_--help.golden index efa48abe90a87..9284d713bc2d2 100644 --- a/cli/testdata/coder_templates_delete_--help.golden +++ b/cli/testdata/coder_templates_delete_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_edit_--help.golden b/cli/testdata/coder_templates_edit_--help.golden index d5fbc8b92d72a..f92ba830ad7c6 100644 --- a/cli/testdata/coder_templates_edit_--help.golden +++ b/cli/testdata/coder_templates_edit_--help.golden @@ -17,7 +17,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_init_--help.golden b/cli/testdata/coder_templates_init_--help.golden index 8e273f5b8d331..076c5f0951a2f 100644 --- a/cli/testdata/coder_templates_init_--help.golden +++ b/cli/testdata/coder_templates_init_--help.golden @@ -8,7 +8,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_list_--help.golden b/cli/testdata/coder_templates_list_--help.golden index 113da8084892d..41cdd9eba3960 100644 --- a/cli/testdata/coder_templates_list_--help.golden +++ b/cli/testdata/coder_templates_list_--help.golden @@ -13,7 +13,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_plan_--help.golden b/cli/testdata/coder_templates_plan_--help.golden index 0c683ef7c8af9..fd3ca2e12eb39 100644 --- a/cli/testdata/coder_templates_plan_--help.golden +++ b/cli/testdata/coder_templates_plan_--help.golden @@ -8,7 +8,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_pull_--help.golden b/cli/testdata/coder_templates_pull_--help.golden index 3f2c869784b0a..af214b70ed954 100644 --- a/cli/testdata/coder_templates_pull_--help.golden +++ b/cli/testdata/coder_templates_pull_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_push_--help.golden b/cli/testdata/coder_templates_push_--help.golden index baf55609e7f17..a8a9653f446c1 100644 --- a/cli/testdata/coder_templates_push_--help.golden +++ b/cli/testdata/coder_templates_push_--help.golden @@ -7,7 +7,7 @@ Flags: --always-prompt Always prompt all parameters. Does not pull parameter values from active template version -d, --directory string Specify the directory to create from, use '-' to read - tar from stdin (default "/tmp/coder-cli-test-workdir") + tar from stdin (default "[current directory]") -h, --help help for push --name string Specify a name for the new template version. It will be automatically generated if not provided. @@ -17,7 +17,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_versions_--help.golden b/cli/testdata/coder_templates_versions_--help.golden index 28c3bf76c317f..b5b345ece283a 100644 --- a/cli/testdata/coder_templates_versions_--help.golden +++ b/cli/testdata/coder_templates_versions_--help.golden @@ -21,7 +21,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_templates_versions_list_--help.golden b/cli/testdata/coder_templates_versions_list_--help.golden index 23edfca5e1b28..6d9844d0fc629 100644 --- a/cli/testdata/coder_templates_versions_list_--help.golden +++ b/cli/testdata/coder_templates_versions_list_--help.golden @@ -8,7 +8,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_tokens_--help.golden b/cli/testdata/coder_tokens_--help.golden index cb5a824b84a24..66b068ebc180b 100644 --- a/cli/testdata/coder_tokens_--help.golden +++ b/cli/testdata/coder_tokens_--help.golden @@ -31,7 +31,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_tokens_create_--help.golden b/cli/testdata/coder_tokens_create_--help.golden index 5cf5081f28dad..22cac73e41b95 100644 --- a/cli/testdata/coder_tokens_create_--help.golden +++ b/cli/testdata/coder_tokens_create_--help.golden @@ -10,7 +10,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_tokens_list_--help.golden b/cli/testdata/coder_tokens_list_--help.golden index 92b22430f82a7..cf72c1c8f15c8 100644 --- a/cli/testdata/coder_tokens_list_--help.golden +++ b/cli/testdata/coder_tokens_list_--help.golden @@ -11,7 +11,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_tokens_remove_--help.golden b/cli/testdata/coder_tokens_remove_--help.golden index 03c361efb1ff7..a0d46d2321b67 100644 --- a/cli/testdata/coder_tokens_remove_--help.golden +++ b/cli/testdata/coder_tokens_remove_--help.golden @@ -11,7 +11,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_update_--help.golden b/cli/testdata/coder_update_--help.golden index 3f037ec8348e8..85ae220fdd5c1 100644 --- a/cli/testdata/coder_update_--help.golden +++ b/cli/testdata/coder_update_--help.golden @@ -15,7 +15,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_users_--help.golden b/cli/testdata/coder_users_--help.golden index 21b3afb126556..c9b0b41d27405 100644 --- a/cli/testdata/coder_users_--help.golden +++ b/cli/testdata/coder_users_--help.golden @@ -20,7 +20,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_users_activate_--help.golden b/cli/testdata/coder_users_activate_--help.golden index 67604e8cd82c4..895aeadab5727 100644 --- a/cli/testdata/coder_users_activate_--help.golden +++ b/cli/testdata/coder_users_activate_--help.golden @@ -16,7 +16,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_users_create_--help.golden b/cli/testdata/coder_users_create_--help.golden index 3266f83f55300..ea1af046b1b25 100644 --- a/cli/testdata/coder_users_create_--help.golden +++ b/cli/testdata/coder_users_create_--help.golden @@ -9,7 +9,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_users_list_--help.golden b/cli/testdata/coder_users_list_--help.golden index 9574e11d0b5c8..0ddb048a665aa 100644 --- a/cli/testdata/coder_users_list_--help.golden +++ b/cli/testdata/coder_users_list_--help.golden @@ -13,7 +13,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_users_show_--help.golden b/cli/testdata/coder_users_show_--help.golden index 1cac8edce7268..250223390ba9c 100644 --- a/cli/testdata/coder_users_show_--help.golden +++ b/cli/testdata/coder_users_show_--help.golden @@ -12,7 +12,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_users_suspend_--help.golden b/cli/testdata/coder_users_suspend_--help.golden index b0b949b41c05e..3e411849c2bc5 100644 --- a/cli/testdata/coder_users_suspend_--help.golden +++ b/cli/testdata/coder_users_suspend_--help.golden @@ -16,7 +16,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features. diff --git a/cli/testdata/coder_version_--help.golden b/cli/testdata/coder_version_--help.golden index 722544319d5b6..c560938c09136 100644 --- a/cli/testdata/coder_version_--help.golden +++ b/cli/testdata/coder_version_--help.golden @@ -8,7 +8,7 @@ Flags: Global Flags: --global-config coder Path to the global coder config directory. - Consumes $CODER_CONFIG_DIR (default "/tmp/coder-cli-test-config") + Consumes $CODER_CONFIG_DIR (default "~/.config/coderv2") --header stringArray HTTP headers added to all requests. Provide as "Key=Value". Consumes $CODER_HEADER --no-feature-warning Suppress warnings about unlicensed features.