From 0e3440ffce78b40879809a74630cd1ede5828880 Mon Sep 17 00:00:00 2001 From: Jev Date: Wed, 8 Apr 2026 07:21:48 +0200 Subject: [PATCH] fix: add HOME environment variable to lxc_exec and improve fzf installation test --- tests/test_tasks.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_tasks.py b/tests/test_tasks.py index 49937ba..b85b56c 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -4,7 +4,7 @@ import subprocess def lxc_exec(container: str, cmd: str, check: bool = True) -> subprocess.CompletedProcess: """Run a command in the container as the jev user.""" return subprocess.run( - ["lxc", "exec", container, "--user", "1000", "--", "bash", "-lc", cmd], + ["lxc", "exec", container, "--user", "1000", "--env", "HOME=/home/jev", "--", "bash", "-lc", cmd], check=check, ) @@ -34,9 +34,10 @@ def test_install_uv(container: str) -> None: def test_install_fzf(container: str) -> None: run_task(container, "install_fzf") - for binary in ["fzf", "batcat"]: - result = lxc_exec(container, f"which {binary}", check=False) - assert result.returncode == 0, f"{binary!r} not found after install_fzf" + result = lxc_exec(container, "test -f ~/.fzf/bin/fzf", check=False) + assert result.returncode == 0, "fzf binary not found at ~/.fzf/bin/fzf after install_fzf" + result = lxc_exec(container, "which batcat", check=False) + assert result.returncode == 0, "batcat not found after install_fzf" def test_install_zoxide(container: str) -> None: