* Companion for https://github.com/paritytech/substrate/pull/12147

* update lockfile for {"substrate", "polkadot"}

* Fix tests

Co-authored-by: parity-processbot <>
This commit is contained in:
Bastian Köcher
2022-09-02 19:33:17 +02:00
committed by GitHub
parent 9db100e228
commit 4257576828
6 changed files with 258 additions and 253 deletions
+5 -1
View File
@@ -117,6 +117,7 @@ pub fn find_ws_url_from_output(read: impl Read + Send) -> (String, String) {
line.expect("failed to obtain next line from stdout for WS address discovery");
data.push_str(&line);
data.push_str("\n");
// does the line contain our port (we expect this specific output from substrate).
let sock_addr = match line.split_once("Running JSON-RPC WS server: addr=") {
@@ -126,7 +127,10 @@ pub fn find_ws_url_from_output(read: impl Read + Send) -> (String, String) {
Some(format!("ws://{}", sock_addr))
})
.expect("We should get a WebSocket address");
.unwrap_or_else(|| {
eprintln!("Output:\n{}", data);
panic!("We should get a WebSocket address")
});
(ws_url, data)
}
@@ -28,8 +28,9 @@ async fn purge_chain_works() {
// Check that both databases are deleted
let base_dir = tempdir().expect("could not create a temp dir");
let base_dir_path = format!("{}/polkadot", base_dir.path().display());
let args = &["--", "--dev"];
let args = &["--", "--dev", "-d", &base_dir_path];
common::run_node_for_a_while(base_dir.path(), args, SIGINT).await;