use of tech.pegasys.teku.cli.BeaconNodeCommand.CONFIG_FILE_OPTION_NAME in project teku by ConsenSys.
the class BeaconNodeCommandTest method overrideConfigFileValuesIfKeyIsPresentInCLIOptions.
@Test
public void overrideConfigFileValuesIfKeyIsPresentInCLIOptions() throws IOException {
final Path configFile = createConfigFile();
final String[] args = { CONFIG_FILE_OPTION_NAME, configFile.toString(), "--p2p-interface", "1.2.3.5" };
beaconNodeCommand.parse(args);
final TekuConfiguration expected = expectedCompleteConfigInFileBuilder().network(n -> n.networkInterface("1.2.3.5")).build();
assertTekuAndLoggingConfiguration(expected, expectedCompleteConfigInFileLoggingBuilder().build());
}
use of tech.pegasys.teku.cli.BeaconNodeCommand.CONFIG_FILE_OPTION_NAME in project teku by ConsenSys.
the class BeaconNodeCommandTest method overrideConfigFileValuesIfKeyIsPresentInEnvironmentVariables.
@Test
public void overrideConfigFileValuesIfKeyIsPresentInEnvironmentVariables() throws IOException {
final Path configFile = createConfigFile();
final String[] args = { CONFIG_FILE_OPTION_NAME, configFile.toString() };
beaconNodeCommand = new BeaconNodeCommand(outputWriter, errorWriter, Collections.singletonMap("TEKU_P2P_INTERFACE", "1.2.3.5"), startAction, loggingConfigurator);
beaconNodeCommand.parse(args);
final TekuConfiguration expected = expectedCompleteConfigInFileBuilder().network(n -> n.networkInterface("1.2.3.5")).build();
assertTekuAndLoggingConfiguration(expected, expectedCompleteConfigInFileLoggingBuilder().build());
}
Aggregations