mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-26 16:18:52 +03:00
test: rename assert_matches_exactly -> assert_full_match
More precise, needed in a later commit.
This commit is contained in:
parent
72000b4a99
commit
7367446761
@ -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}'")
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user