CosmWasm / sylvia

CosmWasm smart contract framework
Apache License 2.0
96 stars 16 forks source link

feat: Generate migrate entry point if message defined on contract #222

Closed jawoznia closed 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Merging #222 (34e537e) into main (d1c0d6e) will decrease coverage by 0.07%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
- Coverage   87.78%   87.72%   -0.07%     
==========================================
  Files          24       24              
  Lines        1302     1303       +1     
==========================================
  Hits         1143     1143              
- Misses        159      160       +1     
Files Changed Coverage Δ
sylvia-derive/src/message.rs 83.51% <0.00%> (-0.23%) :arrow_down:
sylvia/tests/messages_generation.rs 0.00% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jawoznia commented 1 year ago

LGTM, but I would like to see tests for that.

The easiest way to verify that it is working is to add in one of the tests something like:

use entry_points::{instantiate, execute, query, migrate, reply};

You would do that for a single test that emits entry points. I checked manually they are correctly generated, but adding the verification wouldn't hurt.

Agree, but I think better way is to create cw_multi_test::ContractWrapper. This way we will also check if structure of these entry points is correct.