Skip to content

Commit 237f8e4

Browse files
committed
additional testing
1 parent b247bb5 commit 237f8e4

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

cli/configssh_test.go

+17-2
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
509509
},
510510
},
511511
{
512-
name: "Start/End out of order",
512+
name: "Start/End out of order",
513513
matches: []match{
514514
// {match: "Continue?", write: "yes"},
515515
},
@@ -524,7 +524,7 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
524524
wantErr: true,
525525
},
526526
{
527-
name: "Multiple sections",
527+
name: "Multiple sections",
528528
matches: []match{
529529
// {match: "Continue?", write: "yes"},
530530
},
@@ -620,9 +620,24 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
620620
wantErr: false,
621621
hasAgent: true,
622622
wantConfig: wantConfig{
623+
ssh: []string{"Host coder.* *.testy"},
623624
regexMatch: `ProxyCommand .* ssh .* --hostname-suffix testy %h`,
624625
},
625626
},
627+
{
628+
name: "Hostname Prefix and Suffix",
629+
args: []string{
630+
"--yes",
631+
"--ssh-host-prefix", "presto.",
632+
"--hostname-suffix", "testy",
633+
},
634+
wantErr: false,
635+
hasAgent: true,
636+
wantConfig: wantConfig{
637+
ssh: []string{"Host presto.* *.testy"},
638+
regexMatch: `ProxyCommand .* ssh .* --ssh-host-prefix presto\. --hostname-suffix testy %h`,
639+
},
640+
},
626641
}
627642
for _, tt := range tests {
628643
tt := tt

0 commit comments

Comments
 (0)