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

OP: integration test vs. unit test #18

Closed
maurolacy opened this issue Jul 31, 2024 · 4 comments
Closed

OP: integration test vs. unit test #18

maurolacy opened this issue Jul 31, 2024 · 4 comments

Comments

@maurolacy
Copy link
Collaborator

@bap2pecs cloned issue babylonchain/babylon-contract#175 on 2024-06-19:

Context

I see babylon and btc-staking contracts both use integration tests like


// need to add dep `cosmwasm_vm`

static WASM: &[u8] = include_bytes!("../../../artifacts/my_contract.wasm");



#[test]

fn proper_initialization() {

  let mut deps = mock_instance(WASM, &[]);

」

why not just use unit test which is simpler and does not depend on the binary?


#[test]

fn proper_initialization() {

  let mut deps = mock_dependencies();

}

cc @maurolacy @SebastianElvis

Tasks

  • decide the missing integration/uint tests

  • implement those tests

@maurolacy
Copy link
Collaborator Author

@maurolacy
Copy link
Collaborator Author

@SebastianElvis commented on 2024-07-09:

This integration test is supposed to (almost) simulate the real scenario for executing a wasm contract on the wasm runtime. The unit test is still in our laptop/CI's runtime, e.g., x86. We at least need a simple integration test like that to ensure we don't screw up the wasm vm

@SebastianElvis
Copy link
Member

@bap2pecs is this sill relevant?

@bap2pecs
Copy link
Collaborator

we can close it

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

No branches or pull requests

3 participants