Skip to content

Commit

Permalink
tests: remove duplicate NewTransferPath from tests, use one in testin…
Browse files Browse the repository at this point in the history
…g package. (#6075)
  • Loading branch information
DimitrisJim authored Apr 2, 2024
1 parent c92bf55 commit bb739af
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
6 changes: 3 additions & 3 deletions modules/apps/transfer/ibc_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (suite *TransferTestSuite) TestOnChanUpgradeInit() {
suite.Run(tc.name, func() {
suite.SetupTest()

path = NewTransferPath(suite.chainA, suite.chainB)
path = ibctesting.NewTransferPath(suite.chainA, suite.chainB)
path.Setup()

// configure the channel upgrade to modify the underlying connection
Expand Down Expand Up @@ -359,7 +359,7 @@ func (suite *TransferTestSuite) TestOnChanUpgradeTry() {
suite.Run(tc.name, func() {
suite.SetupTest()

path = NewTransferPath(suite.chainA, suite.chainB)
path = ibctesting.NewTransferPath(suite.chainA, suite.chainB)
path.Setup()

// configure the channel upgrade to modify the underlying connection
Expand Down Expand Up @@ -429,7 +429,7 @@ func (suite *TransferTestSuite) TestOnChanUpgradeAck() {
suite.Run(tc.name, func() {
suite.SetupTest()

path = NewTransferPath(suite.chainA, suite.chainB)
path = ibctesting.NewTransferPath(suite.chainA, suite.chainB)
path.Setup()

// configure the channel upgrade to modify the underlying connection
Expand Down
10 changes: 0 additions & 10 deletions modules/apps/transfer/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ func (suite *TransferTestSuite) SetupTest() {
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(3))
}

func NewTransferPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path {
path := ibctesting.NewPath(chainA, chainB)
path.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort
path.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort
path.EndpointA.ChannelConfig.Version = types.Version
path.EndpointB.ChannelConfig.Version = types.Version

return path
}

// Constructs the following sends based on the established channels/connections
// 1 - from chainA to chainB
// 2 - from chainB to chainC
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/types/transfer_authorization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() {
suite.Run(tc.name, func() {
suite.SetupTest()

path := NewTransferPath(suite.chainA, suite.chainB)
path := ibctesting.NewTransferPath(suite.chainA, suite.chainB)
path.Setup()

transferAuthz = types.TransferAuthorization{
Expand Down
11 changes: 0 additions & 11 deletions modules/apps/transfer/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

testifysuite "github.com/stretchr/testify/suite"

"github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibctesting "github.com/cosmos/ibc-go/v8/testing"
)

Expand All @@ -25,16 +24,6 @@ func (suite *TypesTestSuite) SetupTest() {
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
}

func NewTransferPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path {
path := ibctesting.NewPath(chainA, chainB)
path.EndpointA.ChannelConfig.PortID = types.PortID
path.EndpointB.ChannelConfig.PortID = types.PortID
path.EndpointA.ChannelConfig.Version = types.Version
path.EndpointB.ChannelConfig.Version = types.Version

return path
}

func TestTypesTestSuite(t *testing.T) {
testifysuite.Run(t, new(TypesTestSuite))
}

0 comments on commit bb739af

Please sign in to comment.