Drop the byte-exact USAGE pin from test_healthcheck.sh

This commit is contained in:
2026-08-28 15:52:53 +04:00
parent 172c100dec
commit 7d04aef94d
+5 -6
View File
@@ -1,11 +1,11 @@
#!/usr/bin/env bash
# Self-check for orchestra_e2e_healthcheck.sh.
#
# The pinned USAGE string is gone. Pinning the help text meant every flag
# added to the healthcheck turned this file red for a reason that had nothing
# to do with the flag, so the usage assertions now check shape rather than
# exact bytes: --help must print a Usage: line, must mention every long flag
# the script actually parses, and must exit 0 from any argument position.
# The pinned USAGE string is gone. Pinning the help text byte for byte meant
# every flag added to the healthcheck turned this file red for a reason that
# had nothing to do with the flag. The usage assertions now check shape: --help
# must print a Usage: line, must document every long flag the script actually
# parses, and must exit 0 from any argument position.
HC="$(dirname "$0")/orchestra_e2e_healthcheck.sh"
OK='OK - all healthchecks passed'
@@ -36,7 +36,6 @@ usage_shape() { # usage_shape <label> [args...]
Usage:*) ;;
*) fail "$label: no Usage: line" ;;
esac
# Every long flag the script parses must be documented.
for flag in $(grep -o -- '--[a-z][a-z-]*' "$HC" | sort -u); do
case "$got" in
*"$flag"*) ;;