Skip to content

Commit 6a20c88

Browse files
feat(integration test) test omni node dev mod work with dev_json file (#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>
1 parent b6512be commit 6a20c88

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/sdk/src/guides/your_first_node.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,33 @@ mod tests {
305305
test_runtime_preset(FIRST_RUNTIME, 1000, preset);
306306
});
307307
}
308+
309+
#[test]
310+
fn omni_node_dev_mode_works() {
311+
//Omni Node in dev mode works with parachain's template `dev_chain_spec`
312+
let dev_chain_spec = std::env::current_dir()
313+
.unwrap()
314+
.parent()
315+
.unwrap()
316+
.parent()
317+
.unwrap()
318+
.join("templates")
319+
.join("parachain")
320+
.join("dev_chain_spec.json");
321+
322+
maybe_build_omni_node();
323+
let omni_node = find_release_binary(OMNI_NODE).unwrap();
324+
325+
let output = Command::new(omni_node)
326+
.arg("--dev")
327+
.args(["--chain", dev_chain_spec.to_str().unwrap()])
328+
.timeout(std::time::Duration::from_secs(70))
329+
.output()
330+
.unwrap();
331+
332+
// atleast blocks should be imported
333+
assert!(String::from_utf8(output.stderr)
334+
.unwrap()
335+
.contains(format!("Imported #{}", 7).to_string().as_str()));
336+
}
308337
}

0 commit comments

Comments
 (0)