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

Create integration test interface to chain's state machine from rust #23

Closed
iboss-ptk opened this issue Aug 12, 2022 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@iboss-ptk
Copy link
Collaborator

iboss-ptk commented Aug 12, 2022

Background

Integration testing support is needed for better testing experience since using mock in unit test doesn't mean much when performing stateful operation. It would be done by writing test in go (example) but can be tedious since we need to redefine all msg types.

This also pave path for osmosis-labs/beaker#88 and osmosis-labs/beaker#89 that beaker can reuse osmosisd logics.

Expectation

  • create osmosis-testing crate
  • build.rs
    • rebuild on go file change -> run go build in build.rs
    • read go file to find list of exported function
    • use bindgen, whitelist only exported function
  • export basic function
    • create testing account
    • fund account
    • store-code and instantiate
    • check the state
    • execute

Further work

  • Make setup intuitive
  • Add more setup function, eg. new pool. tokenfactory
  • IBC support
@iboss-ptk iboss-ptk changed the title Experiment with Go FFI to create integration test interface to chain's state machine from rust Create integration test interface to chain's state machine from rust Aug 13, 2022
@iboss-ptk iboss-ptk added the enhancement New feature or request label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant