merge-to-master self-test: the nested refusal call's exit is caught (under set -e a plain assignment of a failing substitution ended the script before any check ran)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
46261fb641
commit
51481b1cac
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ if [ "$SELF_TEST" = 1 ]; then
|
|||
fails=0; d=$(mktemp -d); fake="$d/ci-state.sh"
|
||||
# the suspension marker: a GitHub remote is refused with the line, exit 2, before anything else; a mirror remote is not; no marker, no refusal
|
||||
printf 'suspended-since: 2026-10-07T17:02:00Z\n' > "$d/marker"
|
||||
out="$(IGNEUM_GITHUB_SUSPENDED_FILE="$d/marker" bash "$0" --remote origin 2>&1)"; rc=$?
|
||||
rc=0; out="$(IGNEUM_GITHUB_SUSPENDED_FILE="$d/marker" bash "$0" --remote origin 2>&1)" || rc=$? # under set -e a plain assignment of a failing substitution ends the script
|
||||
[ "$rc" = 2 ] || { echo "self-test failed: a GitHub remote under the marker was not refused with exit 2 (exit $rc): $out"; fails=1; }
|
||||
case "$out" in *"REFUSED. GitHub is unreachable"*"--remote box"*) ;; *) echo "self-test failed: the refusal did not name the switch: $out"; fails=1 ;; esac
|
||||
( SUSPENDED_FILE="$d/marker"; github_suspended_refusal box >/dev/null 2>&1 ) && { echo "self-test failed: the box mirror remote was refused under the marker"; fails=1; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue