[#1252] NetworkTests fails to run
- NetworkTests are buildable and can run not crashing due to lack of mocked properties - most tests have been fixed and pass again
This commit is contained in:
parent
2da8dce372
commit
f3f519bfea
|
@ -134,13 +134,9 @@ class BlockStreamingTest: ZcashTestCase {
|
|||
|
||||
let action = DownloadAction(container: mockContainer, configProvider: CompactBlockProcessor.ConfigProvider(config: processorConfig))
|
||||
let blockDownloader = mockContainer.resolve(BlockDownloader.self)
|
||||
let syncControlData = SyncControlData(
|
||||
latestBlockHeight: latestBlockHeight,
|
||||
latestScannedHeight: startHeight,
|
||||
firstUnenhancedHeight: nil
|
||||
)
|
||||
|
||||
let context = ActionContextMock()
|
||||
await context.update(syncControlData: syncControlData)
|
||||
context.updateStateClosure = { _ in }
|
||||
|
||||
let expectation = XCTestExpectation()
|
||||
|
||||
|
@ -175,7 +171,9 @@ class BlockStreamingTest: ZcashTestCase {
|
|||
firstUnenhancedHeight: nil
|
||||
)
|
||||
let context = ActionContextMock()
|
||||
await context.update(syncControlData: syncControlData)
|
||||
context.updateStateClosure = { _ in }
|
||||
context.underlyingSyncControlData = syncControlData
|
||||
context.lastScannedHeight = startHeight
|
||||
|
||||
let date = Date()
|
||||
|
||||
|
|
|
@ -94,14 +94,6 @@ class CompactBlockReorgTests: ZcashTestCase {
|
|||
mockValidateCombinedChainFailureError: .rustValidateCombinedChainInvalidChain(Int32(network.constants.saplingActivationHeight + 320))
|
||||
)
|
||||
|
||||
let transactionRepository = MockTransactionRepository(
|
||||
unminedCount: 0,
|
||||
receivedCount: 0,
|
||||
sentCount: 0,
|
||||
scannedHeight: 0,
|
||||
network: network
|
||||
)
|
||||
|
||||
Dependencies.setup(
|
||||
in: mockContainer,
|
||||
urls: Initializer.URLs(
|
||||
|
@ -117,6 +109,9 @@ class CompactBlockReorgTests: ZcashTestCase {
|
|||
loggingPolicy: .default(.debug)
|
||||
)
|
||||
|
||||
await self.rustBackendMockHelper.rustBackendMock.setPutSaplingSubtreeRootsStartIndexRootsClosure { _, _ in }
|
||||
await self.rustBackendMockHelper.rustBackendMock.setUpdateChainTipHeightClosure { _ in }
|
||||
|
||||
mockContainer.mock(type: LatestBlocksDataProvider.self, isSingleton: true) { [self] _ in
|
||||
LatestBlocksDataProviderImpl(service: service, rustBackend: self.rustBackend)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue