orchestra: pre-release WIP snapshot (orchestra-06g4e6f69akp2pa00s28d7asbc-abb7ef54)

This commit is contained in:
2026-08-28 10:46:43 +04:00
parent 3a076dca70
commit 41dee80241
2 changed files with 32 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Self-check for orchestra_e2e_healthcheck.sh.
HC="$(dirname "$0")/orchestra_e2e_healthcheck.sh"
OK='OK - all healthchecks passed'
USAGE="$(printf 'Usage: orchestra_e2e_healthcheck.sh\n\nHealthcheck script for Orchestra E2E tests.\nExits 0 with a success message if all checks pass.')"
fails=0
check() { # check <expected-stdout> <label> [args...]
local want=$1 label=$2 got status
shift 2
got=$(bash "$HC" "$@" 2>/dev/null)
status=$?
if [ "$got" != "$want" ] || [ "$status" -ne 0 ]; then
printf 'FAIL: %s (exit=%s)\n---got---\n%s\n---want---\n%s\n' "$label" "$status" "$got" "$want"
fails=$((fails + 1))
fi
}
check "$OK" 'no args'
check '' '--quiet' --quiet
check "$USAGE" '--help' --help
check "$USAGE" '--help --quiet' --help --quiet
check "$USAGE" '--quiet --help' --quiet --help
check "$OK" 'unknown flag ignored' --bogus
[ "$fails" -eq 0 ] || exit 1
printf 'all checks passed\n'