EG-2854 Failing Test: net.corda.node.internal.NodeStartupCliTest.--nodeconf using absolute path will not be changed (#6393)

* EG-2854

Failing Test: net.corda.node.internal.NodeStartupCliTest.--nodeconf using absolute path will not be changed

* fix bug EG-2854

* PR comment
This commit is contained in:
pnemeth 2020-06-29 09:40:12 +01:00 committed by GitHub
parent 516a4bf3a1
commit 6fc9f2eacf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,11 +22,13 @@ class NodeStartupCliTest {
companion object {
private lateinit var workingDirectory: Path
private lateinit var rootDirectory: Path
private var customNodeConf = "custom_node.conf"
@BeforeClass
@JvmStatic
fun initDirectories() {
workingDirectory = Paths.get(".").normalize().toAbsolutePath()
rootDirectory = Paths.get("/").normalize().toAbsolutePath()
}
}
@ -64,8 +66,8 @@ class NodeStartupCliTest {
@Test(timeout=300_000)
fun `--nodeconf using absolute path will not be changed`() {
CommandLine.populateCommand(startup, CommonCliConstants.CONFIG_FILE, "/$customNodeConf")
Assertions.assertThat(startup.cmdLineOptions.configFile).isEqualTo( "/" / customNodeConf)
CommandLine.populateCommand(startup, CommonCliConstants.CONFIG_FILE, (rootDirectory / customNodeConf).toString())
Assertions.assertThat(startup.cmdLineOptions.configFile).isEqualTo(rootDirectory / customNodeConf)
}
@Test(timeout=3_000)