referrerpolicy=no-referrer-when-downgrade

Crate substrate_cli_test_utils

Source

Structs§

KillChildOnDrop
NodeInfo
Information extracted from a running node.

Functions§

block_hash
build_substrate
Builds the Substrate project using the provided arguments.
extract_info_from_output
Extract NodeInfo from a running node by parsing its output.
run_node_for_a_while
Run the node for a while (3 blocks)
run_with_timeout
Run the given future and panic if the timeout is hit.
start_node
Starts a new Substrate node in development mode with a temporary chain.
start_node_inline
Similar to crate::start_node spawns a node, but works in environments where the substrate binary is not accessible with cargo_bin("substrate-node"), and allows customising the args passed in.
wait_for_stream_pattern_match
Takes a readable tokio stream (e.g. from a child process ChildStderr or ChildStdout) and a Regex pattern, and checks each line against the given pattern as it is produced. The function returns OK(()) as soon as a line matching the pattern is found, or an Err if the stream ends without any lines matching the pattern.
wait_n_finalized_blocks
Wait for at least n blocks to be finalized from a specified node