mirror of
https://github.com/corda/corda.git
synced 2025-02-20 01:16:42 +00:00
CORDA-792 - Standalone Shell - fix test on Windows (#2757)
Fix test which uses Paths.get() and doesn't match on Windows.
This commit is contained in:
parent
84e930d52a
commit
17eb30965d
@ -9,7 +9,7 @@ import java.io.File
|
||||
|
||||
class StandaloneShellArgsParserTest {
|
||||
|
||||
private val CONFIG_FILE = File(javaClass.classLoader.getResource("config.conf")!!.file)
|
||||
private val CONFIG_FILE = File(StandaloneShellArgsParserTest::class.java.getResource("/config.conf").toURI())
|
||||
|
||||
@Test
|
||||
fun args_to_cmd_options() {
|
||||
@ -33,8 +33,8 @@ class StandaloneShellArgsParserTest {
|
||||
"--keystore-type", "JKS")
|
||||
|
||||
val expectedOptions = CommandLineOptions(configFile = "/x/y/z/config.conf",
|
||||
commandsDirectory = Paths.get("/x/y/commands"),
|
||||
cordappsDirectory = Paths.get("/x/y/cordapps"),
|
||||
commandsDirectory = Paths.get("/x/y/commands").normalize().toAbsolutePath(),
|
||||
cordappsDirectory = Paths.get("/x/y/cordapps").normalize().toAbsolutePath(),
|
||||
host = "alocalhost",
|
||||
port = "1234",
|
||||
user = "demo",
|
||||
@ -42,11 +42,11 @@ class StandaloneShellArgsParserTest {
|
||||
help = true,
|
||||
loggingLevel = Level.DEBUG,
|
||||
sshdPort = "2223",
|
||||
sshdHostKeyDirectory = Paths.get("/x/y/ssh"),
|
||||
sshdHostKeyDirectory = Paths.get("/x/y/ssh").normalize().toAbsolutePath(),
|
||||
keyStorePassword = "pass1",
|
||||
trustStorePassword = "pass2",
|
||||
keyStoreFile = Paths.get("/x/y/keystore.jks"),
|
||||
trustStoreFile = Paths.get("/x/y/truststore.jks"),
|
||||
keyStoreFile = Paths.get("/x/y/keystore.jks").normalize().toAbsolutePath(),
|
||||
trustStoreFile = Paths.get("/x/y/truststore.jks").normalize().toAbsolutePath(),
|
||||
trustStoreType = "dummy",
|
||||
keyStoreType = "JKS")
|
||||
|
||||
@ -125,7 +125,7 @@ class StandaloneShellArgsParserTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun acmd_options_to_config_from_file() {
|
||||
fun cmd_options_to_config_from_file() {
|
||||
|
||||
val options = CommandLineOptions(configFile = CONFIG_FILE.absolutePath,
|
||||
commandsDirectory = null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user