fix: use sudo for nft list tables — /usr/sbin not in roof user PATH
Unit Tests / test (push) Successful in 7m26s
Unit Tests / test (push) Successful in 7m26s
nft lives in /usr/sbin which is absent from the non-root PATH on Debian. The delete call already used sudo; add it to the list call too so the session-scoped cleanup fixture doesn't crash before any test runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,7 @@ def cleanup_stale_e2e_interfaces():
|
|||||||
|
|
||||||
# wg-quick creates an nftables table per interface; if the interface was never brought
|
# wg-quick creates an nftables table per interface; if the interface was never brought
|
||||||
# down cleanly the table persists and drops decrypted ICMP replies on future runs.
|
# down cleanly the table persists and drops decrypted ICMP replies on future runs.
|
||||||
nft_result = subprocess.run(['nft', 'list', 'tables'], capture_output=True, text=True)
|
nft_result = subprocess.run(['sudo', 'nft', 'list', 'tables'], capture_output=True, text=True)
|
||||||
for line in nft_result.stdout.splitlines():
|
for line in nft_result.stdout.splitlines():
|
||||||
if 'wg-quick-pic-e2e-' in line:
|
if 'wg-quick-pic-e2e-' in line:
|
||||||
table_name = line.strip().split()[-1]
|
table_name = line.strip().split()[-1]
|
||||||
|
|||||||
Reference in New Issue
Block a user