Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Tilde (#1504)
Browse files Browse the repository at this point in the history
Remove ~ file locations from tests, this implies ~ should work when it doesn't.
  • Loading branch information
Danno Ferrin authored May 28, 2019
1 parent b6c1ea2 commit a449fb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public void overrideDefaultValuesIfKeyIsPresentInConfigFile() throws IOException
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<RpcApi> expectedApis = asList(ETH, WEB3);
Expand Down Expand Up @@ -328,7 +328,7 @@ public void overrideDefaultValuesIfKeyIsPresentInConfigFile() throws IOException
.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));
Expand Down
4 changes: 2 additions & 2 deletions pantheon/src/test/resources/complete_config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# this is a valid TOML config file

data-path="~/pantheondata" # Path
data-path="/opt/pantheon" # Path

#invalid-option=true

Expand All @@ -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
Expand Down

0 comments on commit a449fb0

Please sign in to comment.