Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 27c3c56731 | |||
| bb03ca6bde |
@@ -0,0 +1,18 @@
|
||||
# Task 06G4E4TYBR6P66BXX82F1NQNPC
|
||||
|
||||
Add a --version flag to the healthcheck script
|
||||
|
||||
- Project: test-e2e
|
||||
- Source: gitea:test-e2e/6
|
||||
- Priority: 0
|
||||
|
||||
## Instructions
|
||||
|
||||
scripts/orchestra_e2e_healthcheck.sh already handles --help. Add a --version flag alongside it that prints the single line 1.0.0 and exits 0. Leave the default behaviour and the --help output unchanged.
|
||||
|
||||
## Completion
|
||||
|
||||
Run the configured quality gate. When the task is ready for the worker to verify and deliver, create `.orchestra/done`. Do not write a prose completion report.
|
||||
|
||||
This file is immutable for the lifetime of the task (§6.2) — its hash is
|
||||
carried in every handoff and re-verified on every pickup. Do not edit it.
|
||||
@@ -7,6 +7,9 @@ main() {
|
||||
printf 'Healthcheck script for Orchestra E2E tests.\n'
|
||||
printf 'Exits 0 with a success message if all checks pass.\n'
|
||||
exit 0
|
||||
elif [ "$arg" = --version ]; then
|
||||
printf '1.0.0\n'
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Checks for orchestra_e2e_healthcheck.sh. Exits non-zero on any mismatch.
|
||||
set -u
|
||||
hc="$(dirname "$0")/orchestra_e2e_healthcheck.sh"
|
||||
fail=0
|
||||
|
||||
check() { # check <description> <expected> <args...>
|
||||
local desc=$1 expected=$2; shift 2
|
||||
local out; out=$(bash "$hc" "$@"); local code=$?
|
||||
if [ "$out" != "$expected" ] || [ "$code" -ne 0 ]; then
|
||||
printf 'FAIL: %s (exit=%s)\n%s\n' "$desc" "$code" "$out" >&2
|
||||
fail=1
|
||||
fi
|
||||
}
|
||||
|
||||
check '--version' '1.0.0' --version
|
||||
check 'no args' 'OK - all healthchecks passed'
|
||||
check '--help' "$(printf 'Usage: orchestra_e2e_healthcheck.sh\n\nHealthcheck script for Orchestra E2E tests.\nExits 0 with a success message if all checks pass.')" --help
|
||||
|
||||
[ "$fail" -eq 0 ] && printf 'all checks passed\n'
|
||||
exit "$fail"
|
||||
Reference in New Issue
Block a user