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

Fix contract wrapper generics #46

Closed

Conversation

ShadoySV
Copy link

@ShadoySV ShadoySV commented Jun 29, 2023

These changes replace generic Q with Empty in such methods as ContractWrapper::with_reply_empty.

We use shared testing mocks within different App types and custom modules. I only managed to do it having the PR changes. Here is an example. This line can be replaced with the next one to see the issue.

Is there any reason to use generic Q instead of Empty, which is used in ContractWrapper::new_with_empty, and any more elegant way to achieve that, or do these changes make sense?

@DariuszDepta DariuszDepta self-assigned this Jan 30, 2024
@DariuszDepta
Copy link
Member

DariuszDepta commented Mar 14, 2024

Fixing in #143, changes will be released in MultiTest 0.16.6, and then we will apply the patch to most recent version (0.20.0) of MultiTest.

@DariuszDepta
Copy link
Member

DariuszDepta commented Mar 15, 2024

I am closing this PR while the version 0.16.6 of MultiTest fixes the reported problem.
Remove this line and replace this line with:

cw-multi-test = "0.16.6"

and then run tests:

$ cargo nextest run
    Finished test [unoptimized + debuginfo] target(s) in 0.10s
    Starting 4 tests across 3 binaries
        PASS [   0.005s] astroport-staking::integration should_not_allow_withdraw_more_than_what_you_have
        PASS [   0.006s] astroport-staking::integration check_deflate_liquidity
        PASS [   0.006s] astroport-staking::integration cw20receive_enter_and_leave
        PASS [   0.006s] astroport-staking::integration should_work_with_more_than_one_participant
------------
     Summary [   0.007s] 4 tests run: 4 passed, 0 skipped

PS. @ShadoySV Thanks a lot for this PR and pointing out this issue! I apologize that it has taken so long to fix it. I hope this fix will enable you to port yout tests to newer versions of MultiTest. All versions starting from 0.20.1 will have this issue fixed.

Thanks once again for your engagement!

Kind regards,
Darek

@DariuszDepta
Copy link
Member

Hi @ShadoySV, @epanchee,

I have prepared a PR for upgrading MultiTest to version 0.20.1: astroport-fi/astroport-core#410

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