diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-25 00:54:53 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-25 00:54:53 -0400 |
| commit | 99a26d7de23bbfc757957c08e47606c3690df4cb (patch) | |
| tree | 614b63abef7a5fdfb65d3e948788588632662f9e /todo.org | |
| parent | 133d036aaa8cbe7523d217f2174fb9de191b61a9 (diff) | |
| download | archsetup-99a26d7de23bbfc757957c08e47606c3690df4cb.tar.gz archsetup-99a26d7de23bbfc757957c08e47606c3690df4cb.zip | |
test(archsetup): scaffold Testinfra post-install validation (P1)
Stand up the Testinfra/pytest harness alongside the existing shell sweep so the two can be compared for parity before pytest takes over.
Adds scripts/testing/tests/ (conftest with failure attribution markers, a report hook, and a target_user fixture, plus three parity checks: user, ufw, dotfiles) and scripts/testing/lib/testinfra.sh, which injects a throwaway SSH key into the VM and runs pytest over SSH. The sweep is advisory here (RUN_TESTINFRA toggle, non-fatal) and does not yet affect pass/fail. Pulls python-pytest and python-pytest-testinfra into make deps.
Verified on the host: py_compile clean, pytest --collect-only green, bash -n and shellcheck clean. The sweep running against a real VM is verified by the next make test run.
Diffstat (limited to 'todo.org')
| -rw-r--r-- | todo.org | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -538,6 +538,8 @@ Done 2026-06-25: added a =backup_system_file <path>= helper next to =safe_rm_rf= :END: *** 2026-06-25 Thu @ Decision: port to Testinfra + expand coverage, design doc first Reviewed against the existing harness: =scripts/testing/lib/validation.sh= already runs ~14 post-install checks (=run_all_validations=), so this isn't net-new capability — it's porting that shell validation to Testinfra/pytest for better expressiveness + reporting, then growing coverage. Craig's call (prioritizes test investment over feature speed): do the port and expand. Starting with a design doc in =docs/design/= per the task's own "design doc not yet written" note. Stale slice to drop/rescope: the X11/startx end-to-end tests (fleet is Wayland/Hyprland now). +*** 2026-06-25 Thu @ 00:54:22 -0400 P1 scaffold landed (advisory, alongside shell sweep) +Built the Testinfra harness skeleton: =scripts/testing/tests/= (conftest.py with the attribution marker + report hook + =target_user= fixture; 3 parity checks — user exists/shell, ufw enabled, dotfiles stowed+readable), =scripts/testing/lib/testinfra.sh= (=run_testinfra_validation=: ephemeral-key injection, ssh-config, pytest-over-SSH; advisory + non-fatal, =RUN_TESTINFRA= toggle), wired into run-test.sh after the shell sweep, and added =python-pytest python-pytest-testinfra= to =make deps=. Verified on host: py_compile clean, =pytest --collect-only= green in a throwaway venv (4 tests, fixtures resolve), =bash -n= + shellcheck clean, unit suite still green. Integration (the pytest sweep actually running against a VM) is unverified here — needs a =make test= run. Decisions locked: inject test key; run both through parity; full expansion (P4) in this task after the P3 cutover. Create comprehensive integration tests using Testinfra (Python + pytest) to validate archsetup installations Tests should cover: |
