Skip to content

Commit

Permalink
feat(integration test) test omni node dev mod work with dev_json file (
Browse files Browse the repository at this point in the history
…#7511)

Closes #7452 

Adds new test for omni node on dev mode working correctly with
dev_chain_spec.json

@skunert

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
MrishoLukamba and github-actions[bot] authored Feb 18, 2025
1 parent b6512be commit 6a20c88
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/sdk/src/guides/your_first_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,33 @@ mod tests {
test_runtime_preset(FIRST_RUNTIME, 1000, preset);
});
}

#[test]
fn omni_node_dev_mode_works() {
//Omni Node in dev mode works with parachain's template `dev_chain_spec`
let dev_chain_spec = std::env::current_dir()
.unwrap()
.parent()
.unwrap()
.parent()
.unwrap()
.join("templates")
.join("parachain")
.join("dev_chain_spec.json");

maybe_build_omni_node();
let omni_node = find_release_binary(OMNI_NODE).unwrap();

let output = Command::new(omni_node)
.arg("--dev")
.args(["--chain", dev_chain_spec.to_str().unwrap()])
.timeout(std::time::Duration::from_secs(70))
.output()
.unwrap();

// atleast blocks should be imported
assert!(String::from_utf8(output.stderr)
.unwrap()
.contains(format!("Imported #{}", 7).to_string().as_str()));
}
}

0 comments on commit 6a20c88

Please sign in to comment.