From 3400b72699f5c7cee53e659081be4e8a8d6d8af2 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 20 Aug 2020 20:52:15 +1000 Subject: [PATCH] fix: Make the start acceptance tests stricter --- zebrad/tests/acceptance.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 39b2629c..c91141b7 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -186,7 +186,9 @@ fn start_no_args() -> Result<()> { let output = child.wait_with_output()?; let output = output.assert_failure()?; - output.stdout_contains(r"Starting zebrad")?; + // start is the default mode, so we check for end of line, to distinguish it + // from seed + output.stdout_contains(r"Starting zebrad$")?; // Make sure the command was killed assert!(output.was_killed()); @@ -270,7 +272,7 @@ fn valid_generated_config_test() -> Result<()> { // Unlike the other tests, these tests can not be run in parallel, because // they use the generated config. So parallel execution can cause port and // cache conflicts. - valid_generated_config("start", r"Starting zebrad")?; + valid_generated_config("start", r"Starting zebrad$")?; valid_generated_config("seed", r"Starting zebrad in seed mode")?; Ok(())