From aa418869b394c1d4f9bb4b826aca957553e37cdf Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 3 Aug 2023 17:16:06 +0200 Subject: [PATCH] tests/trustedcoin: extract fn --- test/tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/tests.py b/test/tests.py index 64ef7eb..1f1ab09 100644 --- a/test/tests.py +++ b/test/tests.py @@ -429,10 +429,12 @@ def _(): @test("trustedcoin") def _(): - machine.wait_for_unit("clightning") - machine.wait_until_succeeds(log_has_string("clightning", "plugin-trustedcoin[^^]\[0m\s+bitcoind RPC working")) - machine.wait_until_succeeds(log_has_string("clightning", "plugin-trustedcoin[^^]\[0m\s+estimatefees error: none of the esploras returned usable responses")) + def expect_clightning_log(str): + machine.wait_until_succeeds(log_has_string("clightning", str)) + machine.wait_for_unit("clightning") + expect_clightning_log("plugin-trustedcoin[^^]\[0m\s+bitcoind RPC working") + expect_clightning_log("plugin-trustedcoin[^^]\[0m\s+estimatefees error: none of the esploras returned usable responses") if "netns-isolation" in enabled_tests: def ip(name):