mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Rename config-ssh --diff to --dry-run (#2575)
* feat: Rename config-ssh `--diff` to `--dry-run` Since the intent between diff and dry-run are different, this change allows for interactive prompts to be shown during `--dry-run`, previously prompts were disabled. Dry-run can also be chanied with `--yes` and `--use-previous-options` for non-interactive modes. Dry-run is like a normal run with changes replaced by diff. Fixes #2530 Co-authored-by: Cian Johnston <cian@coder.com>
This commit is contained in:
co-authored by
Cian Johnston
parent
bd19fcbae1
commit
11c47e0d3b
@@ -494,6 +494,26 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
|
||||
"--yes",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Do not overwrite config when using --dry-run",
|
||||
writeConfig: writeConfig{
|
||||
ssh: strings.Join([]string{
|
||||
baseHeader,
|
||||
"",
|
||||
}, "\n"),
|
||||
},
|
||||
wantConfig: wantConfig{
|
||||
ssh: strings.Join([]string{
|
||||
baseHeader,
|
||||
"",
|
||||
}, "\n"),
|
||||
},
|
||||
args: []string{
|
||||
"--ssh-option", "ForwardAgent=yes",
|
||||
"--dry-run",
|
||||
"--yes",
|
||||
},
|
||||
},
|
||||
|
||||
// Tests for deprecated split coder config.
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user