Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AcknowledgePacket and AcknowledgementExecuted bug + update testing pkg #7170

Merged
merged 5 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ require (
github.com/hashicorp/golang-lru v0.5.4
github.com/magiconair/properties v1.8.2
github.com/mattn/go-isatty v0.0.12
github.com/onsi/ginkgo v1.8.0 // indirect
colin-axner marked this conversation as resolved.
Show resolved Hide resolved
github.com/onsi/gomega v1.5.0 // indirect
github.com/otiai10/copy v1.2.0
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/pkg/errors v0.9.1
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,12 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w=
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
Expand Down Expand Up @@ -775,14 +779,17 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
Expand Down
2 changes: 1 addition & 1 deletion x/ibc/03-connection/keeper/handshake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() {
tc.malleate()

connA := suite.chainA.GetFirstTestConnection(clientA, clientB)
connB := suite.chainA.GetFirstTestConnection(clientB, clientA)
connB := suite.chainB.GetFirstTestConnection(clientB, clientA)

connectionKey := host.KeyConnection(connA.ID)
proofAck, proofHeight := suite.chainA.QueryProof(connectionKey)
Expand Down
20 changes: 10 additions & 10 deletions x/ibc/04-channel/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (suite *KeeperTestSuite) TestQueryChannel() {
func() {
_, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, clientexported.Tendermint)
// init channel
channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, types.ORDERED)
channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.TransferPort, ibctesting.TransferPort, types.ORDERED)
suite.Require().NoError(err)

expChannel = suite.chainA.GetChannel(channelA)
Expand Down Expand Up @@ -134,19 +134,19 @@ func (suite *KeeperTestSuite) TestQueryChannels() {
}

// channel1 is second channel on first connection on chainA
testchannel1, _ := suite.coordinator.CreateChannel(suite.chainA, suite.chainB, connA0, connB0, types.ORDERED)
testchannel1, _ := suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA0, connB0, types.ORDERED)
counterparty1 := types.Counterparty{
PortId: connB0.Channels[1].PortID,
ChannelId: connB0.Channels[1].ID,
}

channel0 := types.NewChannel(
types.OPEN, types.UNORDERED,
counterparty0, []string{connA0.ID}, ibctesting.ChannelVersion,
counterparty0, []string{connA0.ID}, testchannel0.Version,
)
channel1 := types.NewChannel(
types.OPEN, types.ORDERED,
counterparty1, []string{connA0.ID}, ibctesting.ChannelVersion,
counterparty1, []string{connA0.ID}, testchannel1.Version,
)

idCh0 := types.NewIdentifiedChannel(testchannel0.PortID, testchannel0.ID, channel0)
Expand Down Expand Up @@ -225,19 +225,19 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() {
}

// channel1 is second channel on first connection on chainA
testchannel1, _ := suite.coordinator.CreateChannel(suite.chainA, suite.chainB, connA0, connB0, types.ORDERED)
testchannel1, _ := suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA0, connB0, types.ORDERED)
counterparty1 := types.Counterparty{
PortId: connB0.Channels[1].PortID,
ChannelId: connB0.Channels[1].ID,
}

channel0 := types.NewChannel(
types.OPEN, types.UNORDERED,
counterparty0, []string{connA0.ID}, ibctesting.ChannelVersion,
counterparty0, []string{connA0.ID}, testchannel0.Version,
)
channel1 := types.NewChannel(
types.OPEN, types.ORDERED,
counterparty1, []string{connA0.ID}, ibctesting.ChannelVersion,
counterparty1, []string{connA0.ID}, testchannel1.Version,
)

idCh0 := types.NewIdentifiedChannel(testchannel0.PortID, testchannel0.ID, channel0)
Expand All @@ -246,7 +246,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() {
expChannels = []*types.IdentifiedChannel{&idCh0, &idCh1}

req = &types.QueryConnectionChannelsRequest{
Connection: connB0.ID,
Connection: connA0.ID,
Pagination: &query.PageRequest{
Key: nil,
Limit: 2,
Expand Down Expand Up @@ -379,7 +379,7 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() {
func() {
clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, clientexported.Tendermint)
// init channel
channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, types.ORDERED)
channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.TransferPort, ibctesting.TransferPort, types.ORDERED)
suite.Require().NoError(err)

expClientState := suite.chainA.GetClientState(clientA)
Expand Down Expand Up @@ -502,7 +502,7 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() {
func() {
clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, clientexported.Tendermint)
// init channel
channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, types.ORDERED)
channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.TransferPort, ibctesting.TransferPort, types.ORDERED)
suite.Require().NoError(err)

clientState := suite.chainA.GetClientState(clientA)
Expand Down
Loading