Skip to content

Commit

Permalink
fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristure committed Oct 3, 2024
1 parent 23dbb5a commit b9eb2a5
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -698,34 +698,35 @@ func getArgumentsMeta(
cryptoComp *mock.CryptoComponentsMock,
) interceptorscontainer.CommonInterceptorsContainerFactoryArgs {
return interceptorscontainer.CommonInterceptorsContainerFactoryArgs{
CoreComponents: coreComp,
CryptoComponents: cryptoComp,
Accounts: &stateMock.AccountsStub{},
ShardCoordinator: mock.NewOneShardCoordinatorMock(),
NodesCoordinator: shardingMocks.NewNodesCoordinatorMock(),
MainMessenger: &mock.TopicHandlerStub{},
FullArchiveMessenger: &mock.TopicHandlerStub{},
Store: createMetaStore(),
DataPool: createMetaDataPools(),
MaxTxNonceDeltaAllowed: maxTxNonceDeltaAllowed,
TxFeeHandler: &economicsmocks.EconomicsHandlerStub{},
BlockBlackList: &testscommon.TimeCacheStub{},
HeaderSigVerifier: &consensus.HeaderSigVerifierMock{},
HeaderIntegrityVerifier: &mock.HeaderIntegrityVerifierStub{},
ValidityAttester: &mock.ValidityAttesterStub{},
EpochStartTrigger: &mock.EpochStartTriggerStub{},
WhiteListHandler: &testscommon.WhiteListHandlerStub{},
WhiteListerVerifiedTxs: &testscommon.WhiteListHandlerStub{},
AntifloodHandler: &mock.P2PAntifloodHandlerStub{},
ArgumentsParser: &mock.ArgumentParserMock{},
PreferredPeersHolder: &p2pmocks.PeersHolderStub{},
RequestHandler: &testscommon.RequestHandlerStub{},
PeerSignatureHandler: &mock.PeerSignatureHandlerStub{},
SignaturesHandler: &mock.SignaturesHandlerStub{},
HeartbeatExpiryTimespanInSec: 30,
MainPeerShardMapper: &p2pmocks.NetworkShardingCollectorStub{},
FullArchivePeerShardMapper: &p2pmocks.NetworkShardingCollectorStub{},
HardforkTrigger: &testscommon.HardforkTriggerStub{},
NodeOperationMode: common.NormalOperation,
CoreComponents: coreComp,
CryptoComponents: cryptoComp,
Accounts: &stateMock.AccountsStub{},
ShardCoordinator: mock.NewOneShardCoordinatorMock(),
NodesCoordinator: shardingMocks.NewNodesCoordinatorMock(),
MainMessenger: &mock.TopicHandlerStub{},
FullArchiveMessenger: &mock.TopicHandlerStub{},
Store: createMetaStore(),
DataPool: createMetaDataPools(),
MaxTxNonceDeltaAllowed: maxTxNonceDeltaAllowed,
TxFeeHandler: &economicsmocks.EconomicsHandlerStub{},
BlockBlackList: &testscommon.TimeCacheStub{},
HeaderSigVerifier: &consensus.HeaderSigVerifierMock{},
HeaderIntegrityVerifier: &mock.HeaderIntegrityVerifierStub{},
ValidityAttester: &mock.ValidityAttesterStub{},
EpochStartTrigger: &mock.EpochStartTriggerStub{},
WhiteListHandler: &testscommon.WhiteListHandlerStub{},
WhiteListerVerifiedTxs: &testscommon.WhiteListHandlerStub{},
AntifloodHandler: &mock.P2PAntifloodHandlerStub{},
ArgumentsParser: &mock.ArgumentParserMock{},
PreferredPeersHolder: &p2pmocks.PeersHolderStub{},
RequestHandler: &testscommon.RequestHandlerStub{},
PeerSignatureHandler: &mock.PeerSignatureHandlerStub{},
SignaturesHandler: &mock.SignaturesHandlerStub{},
HeartbeatExpiryTimespanInSec: 30,
MainPeerShardMapper: &p2pmocks.NetworkShardingCollectorStub{},
FullArchivePeerShardMapper: &p2pmocks.NetworkShardingCollectorStub{},
HardforkTrigger: &testscommon.HardforkTriggerStub{},
NodeOperationMode: common.NormalOperation,
InterceptedDataVerifierFactory: &mock.InterceptedDataVerifierFactoryMock{},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -724,34 +724,35 @@ func getArgumentsShard(
cryptoComp *mock.CryptoComponentsMock,
) interceptorscontainer.CommonInterceptorsContainerFactoryArgs {
return interceptorscontainer.CommonInterceptorsContainerFactoryArgs{
CoreComponents: coreComp,
CryptoComponents: cryptoComp,
Accounts: &stateMock.AccountsStub{},
ShardCoordinator: mock.NewOneShardCoordinatorMock(),
NodesCoordinator: shardingMocks.NewNodesCoordinatorMock(),
MainMessenger: &mock.TopicHandlerStub{},
FullArchiveMessenger: &mock.TopicHandlerStub{},
Store: createShardStore(),
DataPool: createShardDataPools(),
MaxTxNonceDeltaAllowed: maxTxNonceDeltaAllowed,
TxFeeHandler: &economicsmocks.EconomicsHandlerStub{},
BlockBlackList: &testscommon.TimeCacheStub{},
HeaderSigVerifier: &consensus.HeaderSigVerifierMock{},
HeaderIntegrityVerifier: &mock.HeaderIntegrityVerifierStub{},
SizeCheckDelta: 0,
ValidityAttester: &mock.ValidityAttesterStub{},
EpochStartTrigger: &mock.EpochStartTriggerStub{},
AntifloodHandler: &mock.P2PAntifloodHandlerStub{},
WhiteListHandler: &testscommon.WhiteListHandlerStub{},
WhiteListerVerifiedTxs: &testscommon.WhiteListHandlerStub{},
ArgumentsParser: &mock.ArgumentParserMock{},
PreferredPeersHolder: &p2pmocks.PeersHolderStub{},
RequestHandler: &testscommon.RequestHandlerStub{},
PeerSignatureHandler: &mock.PeerSignatureHandlerStub{},
SignaturesHandler: &mock.SignaturesHandlerStub{},
HeartbeatExpiryTimespanInSec: 30,
MainPeerShardMapper: &p2pmocks.NetworkShardingCollectorStub{},
FullArchivePeerShardMapper: &p2pmocks.NetworkShardingCollectorStub{},
HardforkTrigger: &testscommon.HardforkTriggerStub{},
CoreComponents: coreComp,
CryptoComponents: cryptoComp,
Accounts: &stateMock.AccountsStub{},
ShardCoordinator: mock.NewOneShardCoordinatorMock(),
NodesCoordinator: shardingMocks.NewNodesCoordinatorMock(),
MainMessenger: &mock.TopicHandlerStub{},
FullArchiveMessenger: &mock.TopicHandlerStub{},
Store: createShardStore(),
DataPool: createShardDataPools(),
MaxTxNonceDeltaAllowed: maxTxNonceDeltaAllowed,
TxFeeHandler: &economicsmocks.EconomicsHandlerStub{},
BlockBlackList: &testscommon.TimeCacheStub{},
HeaderSigVerifier: &consensus.HeaderSigVerifierMock{},
HeaderIntegrityVerifier: &mock.HeaderIntegrityVerifierStub{},
SizeCheckDelta: 0,
ValidityAttester: &mock.ValidityAttesterStub{},
EpochStartTrigger: &mock.EpochStartTriggerStub{},
AntifloodHandler: &mock.P2PAntifloodHandlerStub{},
WhiteListHandler: &testscommon.WhiteListHandlerStub{},
WhiteListerVerifiedTxs: &testscommon.WhiteListHandlerStub{},
ArgumentsParser: &mock.ArgumentParserMock{},
PreferredPeersHolder: &p2pmocks.PeersHolderStub{},
RequestHandler: &testscommon.RequestHandlerStub{},
PeerSignatureHandler: &mock.PeerSignatureHandlerStub{},
SignaturesHandler: &mock.SignaturesHandlerStub{},
HeartbeatExpiryTimespanInSec: 30,
MainPeerShardMapper: &p2pmocks.NetworkShardingCollectorStub{},
FullArchivePeerShardMapper: &p2pmocks.NetworkShardingCollectorStub{},
HardforkTrigger: &testscommon.HardforkTriggerStub{},
InterceptedDataVerifierFactory: &mock.InterceptedDataVerifierFactoryMock{},
}
}

0 comments on commit b9eb2a5

Please sign in to comment.