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