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

tests: add ibc test cases #63

Open
wants to merge 13 commits into
base: feat/ibc-v10
Choose a base branch
from

Conversation

zsystm
Copy link

@zsystm zsystm commented Apr 10, 2025

Description

This PR adds test coverage to verify that both IBC v1 and IBC v2 flows are working as expected in ExampleChain.

Coverage

File Name Coverage
github.com/cosmos/evm/ibc/module.go 100.0%
github.com/cosmos/evm/ibc/utils.go 100.0%
github.com/cosmos/evm/tests/ibc/helper.go 81.0%
github.com/cosmos/evm/testutil/ibc.go 100.0%
github.com/cosmos/evm/x/erc20/ibc_middleware.go 91.7%
github.com/cosmos/evm/x/erc20/keeper/ibc_callbacks.go 87.9%
github.com/cosmos/evm/x/ibc/transfer/ibc_module.go 100.0%
github.com/cosmos/evm/x/ibc/transfer/keeper/keeper.go 100.0%
github.com/cosmos/evm/x/ibc/transfer/keeper/msg_server.go 100.0%
github.com/cosmos/evm/x/ibc/transfer/module.go 72.7%
github.com/cosmos/evm/x/ibc/transfer/v2/ibc_module.go 100.0%
# How to get coverage
go test -coverpkg=./... -coverprofile=coverage.out -tags=test ./... 
go tool cover -html=coverage.out -o coverage.html

Closes: #46


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

Reviewers Checklist

All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.

I have...

  • added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code
  • reviewed content
  • tested instructions (if applicable)
  • confirmed all CI checks have passed

@dongsam dongsam mentioned this pull request Apr 10, 2025
9 tasks
@zsystm zsystm self-assigned this Apr 10, 2025
@zsystm zsystm force-pushed the tests/ibc-testcases branch from 4266a7b to 2c2ff33 Compare April 10, 2025 15:43
and also update comments and variable name
@zsystm zsystm force-pushed the tests/ibc-testcases branch from 089b850 to 626aa09 Compare April 10, 2025 16:29
@zsystm zsystm requested a review from dongsam April 10, 2025 16:39
@zsystm zsystm marked this pull request as ready for review April 10, 2025 16:39
@zsystm zsystm force-pushed the tests/ibc-testcases branch from 4f04bdf to ffd131a Compare April 10, 2025 16:43
Copy link
Member

@dongsam dongsam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks good to me

  1. How about adding a test case to reach coverage this part as well?
  2. We also need to add test cases for the ICS20-related precompile, but since the removal of authz dependency is currently in progress, it seems more efficient to handle it after that change is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants