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

Open
maurolacy opened this issue Jul 31, 2024 · 2 comments
Open

OP: integration test vs. unit test #18

maurolacy opened this issue Jul 31, 2024 · 2 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

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

1 participant