From 3e3b7c2b927625050f4e22cd2e651ba5e24da45b Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Tue, 28 May 2019 14:27:59 -0600 Subject: [PATCH] Tilde (#1504) Remove ~ file locations from tests, this implies ~ should work when it doesn't. Signed-off-by: Adrian Sutton --- .../java/tech/pegasys/pantheon/cli/PantheonCommandTest.java | 4 ++-- pantheon/src/test/resources/complete_config.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pantheon/src/test/java/tech/pegasys/pantheon/cli/PantheonCommandTest.java b/pantheon/src/test/java/tech/pegasys/pantheon/cli/PantheonCommandTest.java index b15cf3f773..8632819266 100644 --- a/pantheon/src/test/java/tech/pegasys/pantheon/cli/PantheonCommandTest.java +++ b/pantheon/src/test/java/tech/pegasys/pantheon/cli/PantheonCommandTest.java @@ -274,7 +274,7 @@ public class PantheonCommandTest extends CommandTestAbstract { final Path genesisFile = createFakeGenesisFile(GENESIS_VALID_JSON); final String updatedConfig = Resources.toString(configFile, UTF_8) - .replace("~/genesis.json", escapeTomlString(genesisFile.toString())); + .replace("/opt/pantheon/genesis.json", escapeTomlString(genesisFile.toString())); final Path toml = createTempFile("toml", updatedConfig.getBytes(UTF_8)); final List expectedApis = asList(ETH, WEB3); @@ -328,7 +328,7 @@ public class PantheonCommandTest extends CommandTestAbstract { .setGenesisConfig(encodeJsonGenesis(GENESIS_VALID_JSON)) .setBootNodes(nodes) .build(); - verify(mockControllerBuilder).dataDirectory(eq(Paths.get("~/pantheondata").toAbsolutePath())); + verify(mockControllerBuilder).dataDirectory(eq(Paths.get("/opt/pantheon").toAbsolutePath())); verify(mockControllerBuilderFactory).fromEthNetworkConfig(eq(networkConfig)); verify(mockSyncConfBuilder).syncMode(eq(SyncMode.FAST)); diff --git a/pantheon/src/test/resources/complete_config.toml b/pantheon/src/test/resources/complete_config.toml index c7502b58c4..b6323e9ab0 100644 --- a/pantheon/src/test/resources/complete_config.toml +++ b/pantheon/src/test/resources/complete_config.toml @@ -1,6 +1,6 @@ # this is a valid TOML config file -data-path="~/pantheondata" # Path +data-path="/opt/pantheon" # Path #invalid-option=true @@ -26,7 +26,7 @@ metrics-host="8.6.7.5" metrics-port=309 # chain -genesis-file="~/genesis.json" # Path +genesis-file="/opt/pantheon/genesis.json" # Path network-id=42 sync-mode="fast"# should be FAST or FULL (or fast or full) fast-sync-min-peers=13