From 73674467616109806c8501f1357b699fadc9b342 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 20 Aug 2020 13:11:05 +0200 Subject: [PATCH] test: rename assert_matches_exactly -> assert_full_match More precise, needed in a later commit. --- test/scenarios/lib.py | 2 +- test/scenarios/withnetns.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/scenarios/lib.py b/test/scenarios/lib.py index 2989fec..78c28a8 100644 --- a/test/scenarios/lib.py +++ b/test/scenarios/lib.py @@ -9,7 +9,7 @@ def assert_matches(cmd, regexp): raise Exception(f"Pattern '{regexp}' not found in '{out}'") -def assert_matches_exactly(cmd, regexp): +def assert_full_match(cmd, regexp): out = succeed(cmd) if not re.fullmatch(regexp, out): raise Exception(f"Pattern '{regexp}' doesn't match '{out}'") diff --git a/test/scenarios/withnetns.py b/test/scenarios/withnetns.py index 7534a14..6b5df81 100644 --- a/test/scenarios/withnetns.py +++ b/test/scenarios/withnetns.py @@ -84,7 +84,7 @@ def prestop(): machine.fail("netns-exec nb-electrs ip a") # test that netns-exec drops capabilities - assert_matches_exactly( + assert_full_match( "su operator -c 'netns-exec nb-bitcoind capsh --print | grep Current '", "Current: =\n" )