1- package pusher
1+ package pusher_test
22
33import (
44 "context"
@@ -10,12 +10,14 @@ import (
1010 "github.com/stretchr/testify/mock"
1111 "github.com/stretchr/testify/suite"
1212
13+ "github.com/onflow/flow-go/engine/collection/pusher"
1314 "github.com/onflow/flow-go/model/flow"
1415 "github.com/onflow/flow-go/model/flow/filter"
1516 "github.com/onflow/flow-go/model/messages"
1617 "github.com/onflow/flow-go/module/irrecoverable"
1718 "github.com/onflow/flow-go/module/metrics"
1819 module "github.com/onflow/flow-go/module/mock"
20+ "github.com/onflow/flow-go/network/channels"
1921 "github.com/onflow/flow-go/network/mocknetwork"
2022 protocol "github.com/onflow/flow-go/state/protocol/mock"
2123 storage "github.com/onflow/flow-go/storage/mock"
@@ -33,7 +35,7 @@ type Suite struct {
3335 collections * storage.Collections
3436 transactions * storage.Transactions
3537
36- engine * Engine
38+ engine * pusher. Engine
3739}
3840
3941func (suite * Suite ) SetupTest () {
@@ -64,7 +66,7 @@ func (suite *Suite) SetupTest() {
6466 suite .collections = new (storage.Collections )
6567 suite .transactions = new (storage.Transactions )
6668
67- suite .engine , err = New (
69+ suite .engine , err = pusher . New (
6870 zerolog .New (io .Discard ),
6971 net ,
7072 suite .state ,
@@ -117,7 +119,7 @@ func (suite *Suite) TestSubmitCollectionGuaranteeNonLocal() {
117119 msg := & messages.SubmitCollectionGuarantee {
118120 Guarantee : * guarantee ,
119121 }
120- err := suite .engine .process ( sender .NodeID , msg )
122+ err := suite .engine .Process ( channels . PushGuarantees , sender .NodeID , msg )
121123 suite .Require ().Error (err )
122124
123125 suite .conduit .AssertNumberOfCalls (suite .T (), "Multicast" , 0 )
0 commit comments