Search in sources :

Example 6 with MirrorProperties

use of com.hedera.mirror.importer.MirrorProperties in project hedera-mirror-node by hashgraph.

the class AddressBookServiceImplTest method startupWithOtherNetworkIncorrectInitialAddressBookPath.

@Test
void startupWithOtherNetworkIncorrectInitialAddressBookPath() {
    MirrorProperties otherNetworkMirrorProperties = new MirrorProperties();
    otherNetworkMirrorProperties.setDataPath(dataPath);
    otherNetworkMirrorProperties.setInitialAddressBook(dataPath.resolve("test-v1"));
    otherNetworkMirrorProperties.setNetwork(MirrorProperties.HederaNetwork.OTHER);
    AddressBookService customAddressBookService = new AddressBookServiceImpl(addressBookRepository, fileDataRepository, otherNetworkMirrorProperties, transactionTemplate);
    assertThrows(IllegalStateException.class, () -> {
        customAddressBookService.getCurrent();
    });
    assertEquals(0, addressBookRepository.count());
}
Also used : MirrorProperties(com.hedera.mirror.importer.MirrorProperties) Test(org.junit.jupiter.api.Test) IntegrationTest(com.hedera.mirror.importer.IntegrationTest)

Example 7 with MirrorProperties

use of com.hedera.mirror.importer.MirrorProperties in project hedera-mirror-node by hashgraph.

the class MirrorDateRangePropertiesProcessorTest method setUp.

@BeforeEach
void setUp() {
    mirrorProperties = new MirrorProperties();
    mirrorProperties.setNetwork(MirrorProperties.HederaNetwork.TESTNET);
    CommonDownloaderProperties commonDownloaderProperties = new CommonDownloaderProperties(mirrorProperties);
    var balanceDownloaderProperties = new BalanceDownloaderProperties(mirrorProperties, commonDownloaderProperties);
    var eventDownloaderProperties = new EventDownloaderProperties(mirrorProperties, commonDownloaderProperties);
    var recordDownloaderProperties = new RecordDownloaderProperties(mirrorProperties, commonDownloaderProperties);
    downloaderPropertiesList = List.of(balanceDownloaderProperties, eventDownloaderProperties, recordDownloaderProperties);
    mirrorDateRangePropertiesProcessor = new MirrorDateRangePropertiesProcessor(mirrorProperties, downloaderPropertiesList, accountBalanceFileRepository, eventFileRepository, recordFileRepository);
    balanceDownloaderProperties.setEnabled(true);
    eventDownloaderProperties.setEnabled(true);
    recordDownloaderProperties.setEnabled(true);
}
Also used : EventDownloaderProperties(com.hedera.mirror.importer.downloader.event.EventDownloaderProperties) BalanceDownloaderProperties(com.hedera.mirror.importer.downloader.balance.BalanceDownloaderProperties) RecordDownloaderProperties(com.hedera.mirror.importer.downloader.record.RecordDownloaderProperties) MirrorProperties(com.hedera.mirror.importer.MirrorProperties) CommonDownloaderProperties(com.hedera.mirror.importer.downloader.CommonDownloaderProperties) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 8 with MirrorProperties

use of com.hedera.mirror.importer.MirrorProperties in project hedera-mirror-node by hashgraph.

the class AccountBalanceLineParserV1Test method setup.

@BeforeEach
void setup() {
    mirrorProperties = new MirrorProperties();
    parser = new AccountBalanceLineParserV1(mirrorProperties);
}
Also used : MirrorProperties(com.hedera.mirror.importer.MirrorProperties) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

MirrorProperties (com.hedera.mirror.importer.MirrorProperties)8 BeforeEach (org.junit.jupiter.api.BeforeEach)4 IntegrationTest (com.hedera.mirror.importer.IntegrationTest)2 Test (org.junit.jupiter.api.Test)2 StreamFile (com.hedera.mirror.common.domain.StreamFile)1 StreamType (com.hedera.mirror.common.domain.StreamType)1 AddressBook (com.hedera.mirror.common.domain.addressbook.AddressBook)1 DomainUtils (com.hedera.mirror.common.util.DomainUtils)1 FileCopier (com.hedera.mirror.importer.FileCopier)1 StreamFilename (com.hedera.mirror.importer.domain.StreamFilename)1 DATA (com.hedera.mirror.importer.domain.StreamFilename.FileType.DATA)1 CommonDownloaderProperties (com.hedera.mirror.importer.downloader.CommonDownloaderProperties)1 DownloaderProperties (com.hedera.mirror.importer.downloader.DownloaderProperties)1 BalanceDownloaderProperties (com.hedera.mirror.importer.downloader.balance.BalanceDownloaderProperties)1 EventDownloaderProperties (com.hedera.mirror.importer.downloader.event.EventDownloaderProperties)1 RecordDownloaderProperties (com.hedera.mirror.importer.downloader.record.RecordDownloaderProperties)1 InvalidConfigurationException (com.hedera.mirror.importer.exception.InvalidConfigurationException)1 AccountBalanceFileRepository (com.hedera.mirror.importer.repository.AccountBalanceFileRepository)1 EventFileRepository (com.hedera.mirror.importer.repository.EventFileRepository)1 RecordFileRepository (com.hedera.mirror.importer.repository.RecordFileRepository)1