From 9ddf7864a4298df1dd996478f81a6a96d1a8af8f Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 29 Oct 2020 21:20:35 +0100 Subject: [PATCH] lightning-loop regtest: fix incorrectly succeeding test When 'loop getparams' fails, jq gets no stdin and exits with code 0. Because -o pipefail is not enabled in the testing shell, the whole test command succeeds, although it should fail. Just test "loop getparams" instead and ignore its output. --- test/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests.py b/test/tests.py index 2d56f8d..dd1d886 100644 --- a/test/tests.py +++ b/test/tests.py @@ -337,7 +337,7 @@ def _(): machine.wait_until_succeeds( log_has_string("lightning-loop", "Starting event loop at height 10") ) - succeed("sudo -u operator loop getparams | jq -e '.rules'") + succeed("sudo -u operator loop getparams") if "netns-isolation" in enabled_tests: