aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/run-test.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-25 00:54:53 -0400
committerCraig Jennings <c@cjennings.net>2026-06-25 00:54:53 -0400
commit5a76e5ce034a3ca11ebb368cd91d7b896b33c0c8 (patch)
treeb22d14155910b6e92ff257ef10a3b4daa0cc27a1 /scripts/testing/run-test.sh
parent943dfa9c02538a10d98a5d490ce71d593bf0459c (diff)
downloadarchsetup-5a76e5ce034a3ca11ebb368cd91d7b896b33c0c8.tar.gz
archsetup-5a76e5ce034a3ca11ebb368cd91d7b896b33c0c8.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 'scripts/testing/run-test.sh')
-rwxr-xr-xscripts/testing/run-test.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/testing/run-test.sh b/scripts/testing/run-test.sh
index 9b47747..314097a 100755
--- a/scripts/testing/run-test.sh
+++ b/scripts/testing/run-test.sh
@@ -24,6 +24,7 @@ source "$SCRIPT_DIR/lib/logging.sh"
source "$SCRIPT_DIR/lib/vm-utils.sh"
source "$SCRIPT_DIR/lib/network-diagnostics.sh"
source "$SCRIPT_DIR/lib/validation.sh"
+source "$SCRIPT_DIR/lib/testinfra.sh"
# Parse arguments
KEEP_VM=false
@@ -321,6 +322,11 @@ set +e
run_all_validations
validate_all_services
+# Advisory Testinfra sweep alongside the shell sweep (P1). Compare the two on a
+# real run to confirm parity before pytest becomes primary. Does not affect
+# pass/fail yet.
+run_testinfra_validation "$TEST_RESULTS_DIR"
+
# Analyze log differences (pre vs post install)
analyze_log_diff "$TEST_RESULTS_DIR"