Skip to content

Commit c5e0ec1

Browse files
committed
chore: fix tests
1 parent a785392 commit c5e0ec1

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

cli/configssh_test.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -588,43 +588,46 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
588588
{
589589
name: "Header command",
590590
args: []string{
591-
"--header-command", "/foo/bar/coder",
591+
"--yes",
592+
"--header-command", "printf h1=v1",
592593
},
593-
wantErr: false,
594594
echoResponse: &echo.Responses{
595595
Parse: echo.ParseComplete,
596596
ProvisionApply: echo.ProvisionApplyWithAgent(""),
597597
},
598+
wantErr: false,
598599
wantConfig: wantConfig{
599-
regexMatch: "--header-command \"/foo/bar/coder\" ssh",
600+
regexMatch: "--header-command \"printf h1=v1\" ssh",
600601
},
601602
},
602603
{
603604
name: "Header command with double quotes",
604605
args: []string{
605-
"--header-command", "/foo/bar/coder arg1 arg2=\"quoted value\"",
606+
"--yes",
607+
"--header-command", "printf h1=v1 h2=\"v2\"",
606608
},
607-
wantErr: false,
608609
echoResponse: &echo.Responses{
609610
Parse: echo.ParseComplete,
610611
ProvisionApply: echo.ProvisionApplyWithAgent(""),
611612
},
613+
wantErr: false,
612614
wantConfig: wantConfig{
613-
regexMatch: "--header-command \"/foo/bar/coder arg1 arg2=\\\"quoted value\\\"\" ssh",
615+
regexMatch: "--header-command \"printf h1=v1 h2=\\\\\"v2\\\\\"\" ssh",
614616
},
615617
},
616618
{
617619
name: "Header command with single quotes",
618620
args: []string{
619-
"--header-command", "/foo/bar/coder arg1 arg2='quoted value'",
621+
"--yes",
622+
"--header-command", "printf h1=v1 h2='v2'",
620623
},
621-
wantErr: false,
622624
echoResponse: &echo.Responses{
623625
Parse: echo.ParseComplete,
624626
ProvisionApply: echo.ProvisionApplyWithAgent(""),
625627
},
628+
wantErr: false,
626629
wantConfig: wantConfig{
627-
regexMatch: "--header-command \"/foo/bar/coder arg1 arg2='quoted value'\" ssh",
630+
regexMatch: "--header-command \"printf h1=v1 h2='v2'\" ssh",
628631
},
629632
},
630633
}

0 commit comments

Comments
 (0)