From 1f96ca67c5eed4bdf206dc4870e4aad6c5c48d12 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 16 Oct 2020 17:43:18 +0200 Subject: [PATCH] electrs test: make service shutdown optional Needed for regtest scenario. --- test/tests.nix | 3 +++ test/tests.py | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/tests.nix b/test/tests.nix index 799328f..2444245 100644 --- a/test/tests.nix +++ b/test/tests.nix @@ -105,6 +105,9 @@ let testEnv = rec { services.nix-bitcoin-webindex.enable = true; tests.secure-node = true; tests.banlist-and-restart = true; + + # Stop electrs from spamming the test log with 'WARN - wait until IBD is over' messages + tests.stop-electrs = true; }; netns = { diff --git a/test/tests.py b/test/tests.py index 7d0409a..685ccde 100644 --- a/test/tests.py +++ b/test/tests.py @@ -111,14 +111,18 @@ def _(): ) -# Impure: Stops electrs @test("electrs") def _(): assert_running("electrs") wait_for_open_port(ip("electrs"), 4224) # prometeus metrics provider # Check RPC connection to bitcoind machine.wait_until_succeeds(log_has_string("electrs", "NetworkInfo")) - # Stop electrs from spamming the test log with 'wait for bitcoind sync' messages + + +# Impure: Stops electrs +# Stop electrs from spamming the test log with 'WARN - wait until IBD is over' messages +@test("stop-electrs") +def _(): succeed("systemctl stop electrs")