-
Notifications
You must be signed in to change notification settings - Fork 596
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
Add flush status check in SendPacket #3912
Changes from 9 commits
a290fed
adfc53e
31acbec
40d9351
3d29ad0
23b897f
6943317
3a2fdd0
ed4bdac
1f406ea
135a990
d4fd43f
6666805
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -217,6 +217,43 @@ func (suite *KeeperTestSuite) TestSendPacket() { | |||||
|
||||||
channelCap = capabilitytypes.NewCapability(5) | ||||||
}, false}, | ||||||
{ | ||||||
"invalid flush status: FLUSHING", | ||||||
func() { | ||||||
suite.coordinator.Setup(path) | ||||||
sourceChannel = path.EndpointA.ChannelID | ||||||
|
||||||
channel := path.EndpointA.GetChannel() | ||||||
channel.FlushStatus = types.FLUSHING | ||||||
path.EndpointA.SetChannel(channel) | ||||||
}, | ||||||
false, | ||||||
}, | ||||||
{ | ||||||
"invalid flush status: FLUSHCOMPLETE", | ||||||
func() { | ||||||
suite.coordinator.Setup(path) | ||||||
sourceChannel = path.EndpointA.ChannelID | ||||||
|
||||||
channel := path.EndpointA.GetChannel() | ||||||
channel.FlushStatus = types.FLUSHCOMPLETE | ||||||
path.EndpointA.SetChannel(channel) | ||||||
}, | ||||||
false, | ||||||
}, | ||||||
{ | ||||||
"channel is in INITUPGRADE stage", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. state stage tomato tomago There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤠 |
||||||
func() { | ||||||
suite.coordinator.Setup(path) | ||||||
|
||||||
path.EndpointA.ChannelConfig.ProposedUpgrade.Fields.Version = ibcmock.UpgradeVersion | ||||||
path.EndpointB.ChannelConfig.ProposedUpgrade.Fields.Version = ibcmock.UpgradeVersion | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this line necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's not great catch! We can remove this. |
||||||
|
||||||
err := path.EndpointA.ChanUpgradeInit() | ||||||
suite.Require().NoError(err) | ||||||
}, | ||||||
false, | ||||||
}, | ||||||
} | ||||||
|
||||||
for i, tc := range testCases { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to add an additional check for channel state? I.e: