Skip to content

Commit 0ae03f3

Browse files
committed
additional testing
1 parent b5ff7b8 commit 0ae03f3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

cli/configssh_test.go

Lines changed: 17 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy