Remove ~ file locations from tests, this implies ~ should work when it doesn't.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Danno Ferrin 6 years ago committed by GitHub
parent d6707b5af6
commit 3e3b7c2b92
  1. 4
      pantheon/src/test/java/tech/pegasys/pantheon/cli/PantheonCommandTest.java
  2. 4
      pantheon/src/test/resources/complete_config.toml

@ -274,7 +274,7 @@ public class PantheonCommandTest extends CommandTestAbstract {
final Path genesisFile = createFakeGenesisFile(GENESIS_VALID_JSON); final Path genesisFile = createFakeGenesisFile(GENESIS_VALID_JSON);
final String updatedConfig = final String updatedConfig =
Resources.toString(configFile, UTF_8) 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 Path toml = createTempFile("toml", updatedConfig.getBytes(UTF_8));
final List<RpcApi> expectedApis = asList(ETH, WEB3); final List<RpcApi> expectedApis = asList(ETH, WEB3);
@ -328,7 +328,7 @@ public class PantheonCommandTest extends CommandTestAbstract {
.setGenesisConfig(encodeJsonGenesis(GENESIS_VALID_JSON)) .setGenesisConfig(encodeJsonGenesis(GENESIS_VALID_JSON))
.setBootNodes(nodes) .setBootNodes(nodes)
.build(); .build();
verify(mockControllerBuilder).dataDirectory(eq(Paths.get("~/pantheondata").toAbsolutePath())); verify(mockControllerBuilder).dataDirectory(eq(Paths.get("/opt/pantheon").toAbsolutePath()));
verify(mockControllerBuilderFactory).fromEthNetworkConfig(eq(networkConfig)); verify(mockControllerBuilderFactory).fromEthNetworkConfig(eq(networkConfig));
verify(mockSyncConfBuilder).syncMode(eq(SyncMode.FAST)); verify(mockSyncConfBuilder).syncMode(eq(SyncMode.FAST));

@ -1,6 +1,6 @@
# this is a valid TOML config file # this is a valid TOML config file
data-path="~/pantheondata" # Path data-path="/opt/pantheon" # Path
#invalid-option=true #invalid-option=true
@ -26,7 +26,7 @@ metrics-host="8.6.7.5"
metrics-port=309 metrics-port=309
# chain # chain
genesis-file="~/genesis.json" # Path genesis-file="/opt/pantheon/genesis.json" # Path
network-id=42 network-id=42
sync-mode="fast"# should be FAST or FULL (or fast or full) sync-mode="fast"# should be FAST or FULL (or fast or full)
fast-sync-min-peers=13 fast-sync-min-peers=13

Loading…
Cancel
Save