test: unit tests for dns drift/sync + hap-bridge, vendored framework [#769]

Moved from KNEL/PFVCluster tests/unit with repo-relative paths.

https://projects.knownelement.com/issues/769#note-4152
This commit is contained in:
2026-09-03 21:45:57 -05:00
parent 33827de0dc
commit da0c3bd868
23 changed files with 1153 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# Minimal unit-test runner: executes tests/unit/*.sh, each self-asserting.
set -uo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PASS=0; FAIL=0; FAILED=""
for t in "$ROOT"/tests/unit/*.sh; do
[ -e "$t" ] || continue
if bash "$t" >"/tmp/rt-$(basename "$t").log" 2>&1; then
PASS=$((PASS+1)); echo "ok $(basename "$t")"
else
FAIL=$((FAIL+1)); FAILED="$FAILED $(basename "$t")"; echo "FAIL $(basename "$t")"
fi
done
echo "passed=$PASS failed=$FAIL$FAILED"
[ "$FAIL" -eq 0 ]