From e8b8e47aa45f455dfcd13ef27cd52354d767aefd Mon Sep 17 00:00:00 2001 From: Dmitrii Iurco Date: Sat, 6 Jun 2026 15:46:09 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20use=20sudo=20for=20nft=20list=20tables?= =?UTF-8?q?=20=E2=80=94=20/usr/sbin=20not=20in=20roof=20user=20PATH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/e2e/helpers/wg_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/helpers/wg_runner.py b/tests/e2e/helpers/wg_runner.py index f8dd7ca..1b04121 100644 --- a/tests/e2e/helpers/wg_runner.py +++ b/tests/e2e/helpers/wg_runner.py @@ -61,7 +61,7 @@ def cleanup_stale_e2e_interfaces(): # 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. - 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(): if 'wg-quick-pic-e2e-' in line: table_name = line.strip().split()[-1]