use of tech.pegasys.teku.test.acceptance.dsl.TekuVoluntaryExit in project teku by ConsenSys.
the class VoluntaryExitAcceptanceTest method shouldChangeValidatorStatusAfterSubmittingVoluntaryExit.
@Test
void shouldChangeValidatorStatusAfterSubmittingVoluntaryExit() throws Exception {
final String networkName = "less-swift";
final BesuNode eth1Node = createBesuNode();
eth1Node.start();
final ValidatorKeystores validatorKeystores = createTekuDepositSender(networkName).sendValidatorDeposits(eth1Node, 4);
final TekuNode beaconNode = createTekuNode(config -> config.withNetwork(networkName).withDepositsFrom(eth1Node));
final TekuVoluntaryExit voluntaryExitProcessFailing = createVoluntaryExit(config -> config.withBeaconNode(beaconNode)).withValidatorKeystores(validatorKeystores);
final TekuVoluntaryExit voluntaryExitProcessSuccessful = createVoluntaryExit(config -> config.withBeaconNode(beaconNode)).withValidatorKeystores(validatorKeystores);
final TekuValidatorNode validatorClient = createValidatorNode(config -> config.withNetwork(networkName).withInteropModeDisabled().withBeaconNode(beaconNode)).withValidatorKeystores(validatorKeystores);
beaconNode.start();
validatorClient.start();
validatorClient.waitForLogMessageContaining("Published block");
validatorClient.waitForLogMessageContaining("Published attestation");
validatorClient.waitForLogMessageContaining("Published aggregate");
beaconNode.waitForLogMessageContaining("Epoch: 1");
voluntaryExitProcessFailing.start();
beaconNode.waitForLogMessageContaining("Epoch: 3");
voluntaryExitProcessSuccessful.start();
validatorClient.waitForLogMessageContaining("has changed status from");
assertThat(voluntaryExitProcessFailing.getLoggedErrors()).contains("Failed to submit exit for validator");
}
Aggregations