use of tech.pegasys.teku.config.TekuConfiguration in project teku by ConsenSys.
the class ExecutionEngineOptionsTest method shouldReadExecutionEngineOptionsFromConfigurationFile.
@Test
public void shouldReadExecutionEngineOptionsFromConfigurationFile() {
final TekuConfiguration config = getTekuConfigurationFromFile("executionEngineOptions_config.yaml");
// Spec doesn't include the merge so execution engine is disabled
assertThat(config.executionEngine().isEnabled()).isFalse();
assertThat(config.executionEngine().getEndpoint()).isEqualTo("http://example.com:1234/path/");
}
use of tech.pegasys.teku.config.TekuConfiguration in project teku by ConsenSys.
the class ExecutionEngineOptionsTest method shouldReportEEEnabledIfSpecEnablesBellatrix.
@Test
public void shouldReportEEEnabledIfSpecEnablesBellatrix() {
final String[] args = { "--Xnetwork-altair-fork-epoch", "0", "--Xnetwork-bellatrix-fork-epoch", "1", "--Xee-endpoint", "http://example.com:1234/path/" };
final TekuConfiguration config = getTekuConfigurationFromArguments(args);
assertThat(config.executionEngine().isEnabled()).isTrue();
assertThat(createConfigBuilder().eth2NetworkConfig(b -> b.altairForkEpoch(UInt64.ZERO).bellatrixForkEpoch(UInt64.ONE)).executionEngine(b -> b.endpoint("http://example.com:1234/path/")).build()).usingRecursiveComparison().isEqualTo(config);
}
use of tech.pegasys.teku.config.TekuConfiguration in project teku by ConsenSys.
the class LoggingOptionsTest method wireLoggingOptions_shouldReadFromConfigurationFile.
@Test
public void wireLoggingOptions_shouldReadFromConfigurationFile() {
final TekuConfiguration config = getTekuConfigurationFromFile("wireLoggingOptions_config.yaml");
final WireLogsConfig wireConfig = config.network().getWireLogsConfig();
assertThat(wireConfig.isLogWireCipher()).isTrue();
assertThat(wireConfig.isLogWirePlain()).isTrue();
assertThat(wireConfig.isLogWireMuxFrames()).isTrue();
assertThat(wireConfig.isLogWireGossip()).isTrue();
}
use of tech.pegasys.teku.config.TekuConfiguration 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.config.TekuConfiguration in project teku by ConsenSys.
the class BeaconNodeCommandTest method assertTekuConfiguration.
private void assertTekuConfiguration(final TekuConfiguration expected) {
final TekuConfiguration actual = getResultingTekuConfiguration();
assertThat(actual).usingRecursiveComparison().isEqualTo(expected);
}
Aggregations