Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add panic cases in tests for
UpgradeOpen
(cosmos#5550)
## Description - Add panic test cases for `OnChanUpgradeOpen` and `OnChanUpgradeRestore` - Reuse mock middleware as the app which doesn't implement the `UpgradeableModule` interface from [cosmos#5406](cosmos#5406) closes: cosmos#5471 ### Commit Message / Changelog Entry ```text test: add panic cases in tests when channel upgrade open or restore ``` see the [guidelines](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) for commit messages. (view raw markdown for examples) --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [x] Targeted PR against the correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#pull-request-targeting)). - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/build/building-modules/11-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/main/testing/README.md#ibc-testing-package). - [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`). - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [x] Provide a [commit message](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) to be used for the changelog entry in the PR description for review. - [ ] Re-reviewed `Files changed` in the Github PR explorer. - [ ] Review `Codecov Report` in the comment section below once CI passes. ## Summary by CodeRabbit - **Tests** - Enhanced testing for channel upgrades in interchain accounts, including new scenarios for error handling. - Added import for `cosmossdk.io/errors`. - Added `expPanic` field to test cases in `TestOnChanUpgradeOpen` function. - Updated the logic in `TestOnChanUpgradeOpen` to handle expected errors and panics based on test cases.
- Loading branch information