use of dsl.SignedArtifacts in project web3signer by ConsenSys.
the class InterchangeImportBadLogicalContentIntegrationTestBase method genesisValidatorRootConflictsWithExistingDbGvr.
@Test
void genesisValidatorRootConflictsWithExistingDbGvr() throws JsonProcessingException {
insertGvr(Bytes32.ZERO);
final InterchangeV5Format interchangeData = new InterchangeV5Format(new Metadata("5", Bytes32.leftPad(Bytes.fromHexString("0x123456"))), List.of(new SignedArtifacts("0x12345678", emptyList(), emptyList())));
final byte[] jsonInput = mapper.writeValueAsBytes(interchangeData);
assertThatThrownBy(() -> slashingProtectionContext.getSlashingProtection().importData(new ByteArrayInputStream(jsonInput))).isInstanceOf(RuntimeException.class).hasMessage("Failed to import database content");
assertDbIsEmpty(jdbi);
}
Aggregations