Skip to content

Conversation

@juggernaut09
Copy link
Contributor

@juggernaut09 juggernaut09 commented Jan 19, 2021

Closes #715

  • Made changes to packages/vm/src/calls.rs
  • Added fn call_migrate_works in tests module.

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.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x//spec/)
  • Added relevant rustdoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Looks good overall. If you apply the suggestions and mark this as ready for review, we can merge.

verifier: new_verifier,
};
let info = mock_info(creator.as_str(), &[]);
let res = call_migrate(&mut instance, &mock_env(), &info, msg);
Copy link
Member

Choose a reason for hiding this comment

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

We need a different call_migrate here than in the integration test. The integration test uses https://github.com/CosmWasm/cosmwasm/blob/master/packages/vm/src/testing/calls.rs (i.e. from the testing:: module) but here we use a similar but different function from https://github.com/CosmWasm/cosmwasm/blob/master/packages/vm/src/calls.rs. This does not require the MigrateMsg type. Instead pass the migrate message as JSON.

@webmaster128
Copy link
Member

I just realized the tests don't pass. If you want to run most tests locally, use the big first block from https://github.com/CosmWasm/cosmwasm/blob/master/README.md#developing. Or pick some of the commands that are relevant.

Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Is this ready to merge?

@juggernaut09 juggernaut09 marked this pull request as ready for review January 19, 2021 14:53
@juggernaut09
Copy link
Contributor Author

Looks good to me. Is this ready to merge?

@webmaster128 it is ready to merge.

@webmaster128
Copy link
Member

Merci!

@webmaster128 webmaster128 merged commit 76bc1e4 into CosmWasm:master Jan 19, 2021
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.

Add test call_migrate_works to VM

2 participants