Skip to content

Commit

Permalink
test: fix raintree message target test
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Jun 29, 2023
1 parent 7cdc9e7 commit fe42ab3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions p2p/raintree/peers_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ import (

"github.com/foxcpp/go-mockdns"
"github.com/golang/mock/gomock"
libp2pPeer "github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem"
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
"github.com/stretchr/testify/require"

"github.com/pokt-network/pocket/internal/testutil"
"github.com/pokt-network/pocket/p2p/config"
typesP2P "github.com/pokt-network/pocket/p2p/types"
mocksP2P "github.com/pokt-network/pocket/p2p/types/mocks"
"github.com/pokt-network/pocket/runtime/configs"
cryptoPocket "github.com/pokt-network/pocket/shared/crypto"
mockModules "github.com/pokt-network/pocket/shared/modules/mocks"
"github.com/stretchr/testify/require"
)

const (
Expand Down Expand Up @@ -290,7 +292,8 @@ func testRainTreeMessageTargets(t *testing.T, expectedMsgProp *ExpectedRainTreeM

hostMock := mocksP2P.NewMockHost(ctrl)
hostMock.EXPECT().Peerstore().Return(libp2pPStore).AnyTimes()
hostMock.EXPECT().SetStreamHandler(gomock.Any(), gomock.Any()).Times(1)
hostMock.EXPECT().SetStreamHandler(gomock.Any(), gomock.Any()).AnyTimes()
hostMock.EXPECT().ID().Return(libp2pPeer.ID("")).AnyTimes()

rtCfg := &config.RainTreeConfig{
Host: hostMock,
Expand Down

0 comments on commit fe42ab3

Please sign in to comment.