Merge remote-tracking branch 'origin/orchestra/06G4M8WHGQ4P3GQMPEEH0RJRHM' into integrate
# Conflicts: # TASK.md # scripts/orchestra_e2e_healthcheck.sh
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
readonly VERSION=1.0.0
|
readonly VERSION=1.0.0
|
||||||
readonly SUCCESS_MESSAGE='OK - all healthchecks passed'
|
readonly SUCCESS_MESSAGE='OK - all healthchecks passed'
|
||||||
|
readonly CHECKS=(script-runs)
|
||||||
|
|
||||||
# emit <format> <template> [args...]: the single output path.
|
# emit <format> <template> [args...]: the single output path.
|
||||||
# format: text or json print; none suppresses (--quiet). Explicit argument,
|
# format: text or json print; none suppresses (--quiet). Explicit argument,
|
||||||
@@ -21,8 +22,14 @@ main() {
|
|||||||
emit text 'Healthcheck script for Orchestra E2E tests.\n'
|
emit text 'Healthcheck script for Orchestra E2E tests.\n'
|
||||||
emit text 'Exits 0 with a success message if all checks pass.\n'
|
emit text 'Exits 0 with a success message if all checks pass.\n'
|
||||||
emit text ' --quiet Suppress the success message; still exits 0.\n'
|
emit text ' --quiet Suppress the success message; still exits 0.\n'
|
||||||
|
emit text ' --list-checks Print the name of each check; exits 0.\n'
|
||||||
emit text 'Version: %s\n' "$VERSION"
|
emit text 'Version: %s\n' "$VERSION"
|
||||||
exit 0
|
exit 0
|
||||||
|
elif [ "$arg" = --list-checks ]; then
|
||||||
|
for name in "${CHECKS[@]}"; do
|
||||||
|
emit text '%s\n' "$name"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
elif [ "$arg" = --quiet ]; then
|
elif [ "$arg" = --quiet ]; then
|
||||||
quiet=1
|
quiet=1
|
||||||
elif [ "$arg" = --json ]; then
|
elif [ "$arg" = --json ]; then
|
||||||
@@ -35,7 +42,7 @@ main() {
|
|||||||
[ -n "$json" ] && format=json
|
[ -n "$json" ] && format=json
|
||||||
|
|
||||||
if [ "$format" = json ]; then
|
if [ "$format" = json ]; then
|
||||||
emit "$format" '{"status":"ok","checks":1}\n'
|
emit "$format" '{"status":"ok","checks":%d}\n' "${#CHECKS[@]}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
HC="$(dirname "$0")/orchestra_e2e_healthcheck.sh"
|
HC="$(dirname "$0")/orchestra_e2e_healthcheck.sh"
|
||||||
OK='OK - all healthchecks passed'
|
OK='OK - all healthchecks passed'
|
||||||
USAGE="$(printf 'Usage: orchestra_e2e_healthcheck.sh [--quiet]\n\nHealthcheck script for Orchestra E2E tests.\nExits 0 with a success message if all checks pass.\n --quiet Suppress the success message; still exits 0.\nVersion: 1.0.0')"
|
USAGE="$(printf 'Usage: orchestra_e2e_healthcheck.sh [--quiet]\n\nHealthcheck script for Orchestra E2E tests.\nExits 0 with a success message if all checks pass.\n --quiet Suppress the success message; still exits 0.\n --list-checks Print the name of each check; exits 0.\nVersion: 1.0.0')"
|
||||||
fails=0
|
fails=0
|
||||||
|
|
||||||
check() { # check <expected-stdout> <label> [args...]
|
check() { # check <expected-stdout> <label> [args...]
|
||||||
|
|||||||
Reference in New Issue
Block a user