Currently NetworkPeer does not expose utilities to work with raw irohad output (except for logging for debugging purposes).
However, it is sometimes desirable to add some assertions of the output, both STDERR and STDOUT. For example, when we supply an invalid genesis, we want to check the exact error message irohad fails with and ensure it is what we expect.
Inspiration
An example of how such API looks like in Deno:
let next_line = next_line(&mut stderr_lines).await.unwrap();
assert_contains!(&next_line, "Fmt started");
assert_contains!(
skip_restarting_line(&mut stderr_lines).await,
"badly_formatted.js"
);
assert_contains!(
wait_contains("Checked", &mut stderr_lines).await,
"Checked 1 file"
);
wait_contains("Fmt finished", &mut stderr_lines).await;
Currently
NetworkPeerdoes not expose utilities to work with rawirohadoutput (except for logging for debugging purposes).However, it is sometimes desirable to add some assertions of the output, both STDERR and STDOUT. For example, when we supply an invalid genesis, we want to check the exact error message
irohadfails with and ensure it is what we expect.Inspiration
An example of how such API looks like in Deno: