File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change
1
+ # --- START CODER JETBRAINS test.coder.invalid
2
+ Host coder-jetbrains--url--test.coder.invalid
3
+ ProxyCommand /tmp/coder-gateway/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-gateway/test.coder.invalid/config --url "https://test.coder.invalid?foo=bar&baz=qux" ssh --stdio --usage-app=jetbrains url
4
+ ConnectTimeout 0
5
+ StrictHostKeyChecking no
6
+ UserKnownHostsFile /dev/null
7
+ LogLevel ERROR
8
+ SetEnv CODER_SSH_SESSION_TYPE=JetBrains
9
+ Host coder-jetbrains--url--test.coder.invalid--bg
10
+ ProxyCommand /tmp/coder-gateway/test.coder.invalid/coder-linux-amd64 --global-config /tmp/coder-gateway/test.coder.invalid/config --url "https://test.coder.invalid?foo=bar&baz=qux" ssh --stdio --usage-app=disable url
11
+ ConnectTimeout 0
12
+ StrictHostKeyChecking no
13
+ UserKnownHostsFile /dev/null
14
+ LogLevel ERROR
15
+ SetEnv CODER_SSH_SESSION_TYPE=JetBrains
16
+ # --- END CODER JETBRAINS test.coder.invalid
Original file line number Diff line number Diff line change @@ -303,6 +303,7 @@ internal class CoderCLIManagerTest {
303
303
val extraConfig : String = " " ,
304
304
val env : Environment = Environment (),
305
305
val sshLogDirectory : Path ? = null ,
306
+ val url : URL ? = null
306
307
)
307
308
308
309
@Test
@@ -390,6 +391,13 @@ internal class CoderCLIManagerTest {
390
391
" blank" ,
391
392
sshLogDirectory = tmpdir.resolve(" ssh-logs" ),
392
393
),
394
+ SSHTest (
395
+ listOf (" url" ),
396
+ input = null ,
397
+ output = " url" ,
398
+ remove = " blank" ,
399
+ url = URL (" https://test.coder.invalid?foo=bar&baz=qux" ),
400
+ ),
393
401
)
394
402
395
403
val newlineRe = " \r ?\n " .toRegex()
@@ -408,7 +416,7 @@ internal class CoderCLIManagerTest {
408
416
env = it.env,
409
417
)
410
418
411
- val ccm = CoderCLIManager (URL (" https://test.coder.invalid" ), settings)
419
+ val ccm = CoderCLIManager (it.url ? : URL (" https://test.coder.invalid" ), settings)
412
420
413
421
// Input is the configuration that we start with, if any.
414
422
if (it.input != null ) {
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ internal class EscapeTest {
15
15
""" C:\echo "hello world"""" to """ "C:\echo \"hello world\""""" ,
16
16
""" C:\"no"\"spaces"""" to """ C:\\"no\"\\"spaces\"""" ,
17
17
""" "C:\Program Files\HeaderCommand.exe" --flag""" to """ "\"C:\Program Files\HeaderCommand.exe\" --flag"""" ,
18
+ " https://coder.com" to """ https://coder.com""" ,
19
+ " https://coder.com/?question" to """ "https://coder.com/?question"""" ,
20
+ " https://coder.com/&ersand" to """ "https://coder.com/&ersand"""" ,
21
+ " https://coder.com/?with&both" to """ "https://coder.com/?with&both"""" ,
18
22
)
19
23
tests.forEach {
20
24
assertEquals(it.value, escape(it.key))
You can’t perform that action at this time.
0 commit comments