mirror of
https://github.com/apache/nifi.git
synced 2025-02-10 20:15:09 +00:00
NIFI-5574 Removed usage of Paths.get() due to TEST_RES_PATH being resolved to a string from a URI, which results in platform-specific path information (C:\) when tests are run on Windows.
This closes #2988 Signed-off-by: Mike Thomsen <mikerthomsen@gmail.com>
This commit is contained in:
parent
ba642485cc
commit
376c344edb
@ -138,7 +138,7 @@ class NiFiGroovyTest extends GroovyTestCase {
|
|||||||
@Test
|
@Test
|
||||||
void testMainShouldHandleMalformedBootstrapKeyFromFile() throws Exception {
|
void testMainShouldHandleMalformedBootstrapKeyFromFile() throws Exception {
|
||||||
// Arrange
|
// Arrange
|
||||||
def passwordFile = Paths.get(TEST_RES_PATH, "NiFiProperties", "password-testMainShouldHandleMalformedBootstrapKeyFromFile.txt").toFile()
|
def passwordFile = new File("${TEST_RES_PATH}/NiFiProperties/password-testMainShouldHandleMalformedBootstrapKeyFromFile.txt")
|
||||||
passwordFile.text = "BAD KEY"
|
passwordFile.text = "BAD KEY"
|
||||||
def args = ["-K", passwordFile.absolutePath] as String[]
|
def args = ["-K", passwordFile.absolutePath] as String[]
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ class NiFiGroovyTest extends GroovyTestCase {
|
|||||||
|
|
||||||
// 64 chars of '0' for a 256 bit key; 32 chars for 128 bit
|
// 64 chars of '0' for a 256 bit key; 32 chars for 128 bit
|
||||||
final String DIFFERENT_KEY = "0" * (currentMaxKeyLengthInBits / 4)
|
final String DIFFERENT_KEY = "0" * (currentMaxKeyLengthInBits / 4)
|
||||||
def passwordFile = Paths.get(TEST_RES_PATH, "NiFiProperties", "password-testInitializePropertiesShouldSetBootstrapKeyFromFile.txt").toFile()
|
def passwordFile = new File("${TEST_RES_PATH}/NiFiProperties/password-testInitializePropertiesShouldSetBootstrapKeyFromFile.txt")
|
||||||
passwordFile.text = DIFFERENT_KEY
|
passwordFile.text = DIFFERENT_KEY
|
||||||
def args = ["-K", passwordFile.absolutePath] as String[]
|
def args = ["-K", passwordFile.absolutePath] as String[]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user