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

Update comments, variable names and assertions on transfer test #3569

Merged
merged 7 commits into from
May 15, 2023

Conversation

bugarela
Copy link
Contributor

@bugarela bugarela commented May 8, 2023

Hello :octocat:

Description

I've been working a quint specification for ICS20 and, while writing a test based on the transfer_test.go test (progress here informalsystems/quint#874), I noticed some of the comments were outdated. Seems like the test was updated to include additional transfer steps, but the comments were not.

This PR:

  1. Updates those comments
  2. Renames path into pathAtoB so it works best along with the existing variable named pathBtoC
  3. Adds an assertion on the balance of chain A at the end (based on outdated comments, felt like this was suppose to be checked)
  4. Changes the test on the escrow account to check the denom that was previously in the escrow account, not the default denom. I think this makes more sense than checking for a denom that was never in the escrow account in the first place.
  • PS: I was not able to check that the escrow account actually has any tokens when it is suppose to. I don't know if I'm doing something wrong or if there is something in the test setup that prevents escrow accounts from being updated.

Commit Message / Changelog Entry

test: update comments, variable names and assertions on transfer test

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.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message 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.

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

Thanks for these improvement, @bugarela! I added an extra check for the escrow account on chain A. I think one comment needs to be updated, since the balance on sender account on chain A will not be empty, but besides that, the changes look good to me! 👍

modules/apps/transfer/transfer_test.go Outdated Show resolved Hide resolved
modules/apps/transfer/transfer_test.go Show resolved Hide resolved
Copy link
Contributor

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Thank you @bugarela 🙏

modules/apps/transfer/transfer_test.go Outdated Show resolved Hide resolved
@crodriguezvega crodriguezvega merged commit 1460714 into cosmos:main May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants