dao-contracts icon indicating copy to clipboard operation
dao-contracts copied to clipboard

add integration test for migration

Open blue-note opened this issue 2 years ago • 1 comments

multi-test doesn't support mocking state so we can test migrating to a new namespace. would be nice to cover this via integration test

blue-note avatar Aug 17 '22 18:08 blue-note

You will need to download the v1 release wasm file for whatever contract you want to migrate, like we do the other code id dependencies external to the latest workspace: https://github.com/DA0-DA0/dao-contracts/blob/main/.github/workflows/integration_tests.yml#L61-L65 and https://github.com/DA0-DA0/dao-contracts/blob/main/scripts/deploy_local.sh#L45-L48

I would recommend doing something like this:

 wget https://github.com/DA0-DA0/dao-contracts/releases/download/v1.0.0/cw_proposal_single.wasm \
            -O artifacts/cw_proposal_single_v1.wasm

Then you can reference it in cosm_orc like so: orc.query('cw_proposal_single_v1')

This isn't ideal but until we have CodeId Package Manager it works.

de-husk avatar Aug 30 '22 21:08 de-husk

multi-test doesn't support mocking state so we can test migrating to a new namespace. would be nice to cover this via integration test

I believe the latest version does now! So I think we can finally test this. We should try to get these tests in for v2.

JakeHartnell avatar Oct 29 '22 19:10 JakeHartnell

multi-test doesn't support mocking state so we can test migrating to a new namespace. would be nice to cover this via integration test

I believe the latest version does now! So I think we can finally test this. We should try to get these tests in for v2.

I read this as "mocking stake" and realize looking back that it says "mocking state". May not get these in for v2, but can give it a shot.

JakeHartnell avatar Nov 23 '22 00:11 JakeHartnell

Seems to be done in dao-core tests.

JakeHartnell avatar Nov 27 '22 01:11 JakeHartnell