aboutsummaryrefslogtreecommitdiff
path: root/docs/design/2026-06-25-testinfra-validation.org
diff options
context:
space:
mode:
Diffstat (limited to 'docs/design/2026-06-25-testinfra-validation.org')
-rw-r--r--docs/design/2026-06-25-testinfra-validation.org8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/design/2026-06-25-testinfra-validation.org b/docs/design/2026-06-25-testinfra-validation.org
index 5c82aa2..0f81231 100644
--- a/docs/design/2026-06-25-testinfra-validation.org
+++ b/docs/design/2026-06-25-testinfra-validation.org
@@ -106,16 +106,18 @@ scripts/testing/tests/
** Example tests (parity)
#+begin_src python
+TEST_USER = os.environ.get("ARCHSETUP_TEST_USER", "archie")
+
def test_ufw_enabled(host):
assert host.service("ufw").is_enabled
-def test_user_cjennings_exists(host):
- u = host.user("cjennings")
+def test_primary_user_exists(host):
+ u = host.user(TEST_USER)
assert u.exists
assert u.shell == "/usr/bin/zsh"
def test_zshrc_stowed_and_readable(host):
- f = host.file("/home/cjennings/.zshrc")
+ f = host.file(f"/home/{TEST_USER}/.zshrc")
assert f.is_symlink
assert ".dotfiles/" in f.linked_to
assert f.exists # not broken