@@ -509,7 +509,7 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
509
509
},
510
510
},
511
511
{
512
- name : "Start/End out of order" ,
512
+ name : "Start/End out of order" ,
513
513
matches : []match {
514
514
// {match: "Continue?", write: "yes"},
515
515
},
@@ -524,7 +524,7 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
524
524
wantErr : true ,
525
525
},
526
526
{
527
- name : "Multiple sections" ,
527
+ name : "Multiple sections" ,
528
528
matches : []match {
529
529
// {match: "Continue?", write: "yes"},
530
530
},
@@ -620,9 +620,24 @@ func TestConfigSSH_FileWriteAndOptionsFlow(t *testing.T) {
620
620
wantErr : false ,
621
621
hasAgent : true ,
622
622
wantConfig : wantConfig {
623
+ ssh : []string {"Host coder.* *.testy" },
623
624
regexMatch : `ProxyCommand .* ssh .* --hostname-suffix testy %h` ,
624
625
},
625
626
},
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
+ },
626
641
}
627
642
for _ , tt := range tests {
628
643
tt := tt
0 commit comments