Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Sep 2, 2020
1 parent 33ced08 commit 50ba484
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions parachain/test-parachains/tests/adder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,18 @@ fn validation_pool() -> ValidationPool {
}

#[test]
pub fn execute_good_on_parent() {
pub fn execute_good_on_parent_with_inprocess_validation() {
let pool = ValidationPool::new(ValidationExecutionMode::InProcess);
execute_good_on_parent(pool);
}

#[test]
pub fn execute_good_on_parent_with_external_process_validation() {
let pool = validation_pool();
execute_good_on_parent(pool);
}

fn execute_good_on_parent(pool: ValidationPool) {
let parent_head = HeadData {
number: 0,
parent_hash: [0; 32],
Expand All @@ -79,7 +90,6 @@ pub fn execute_good_on_parent() {
add: 512,
};

let pool = validation_pool();

let ret = parachain::wasm_executor::validate_candidate(
adder::wasm_binary_unwrap(),
Expand Down
2 changes: 1 addition & 1 deletion parachain/test-parachains/tests/wasm_executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn terminates_on_timeout() {
}

// check that another parachain can validate normaly
adder::execute_good_on_parent();
adder::execute_good_on_parent_with_external_process_validation();
}

#[test]
Expand Down

0 comments on commit 50ba484

Please sign in to comment.