Compare commits
1 commit
76a87d745c
...
848e3f42ef
| Author | SHA1 | Date | |
|---|---|---|---|
| 848e3f42ef |
1 changed files with 4 additions and 5 deletions
|
|
@ -3433,7 +3433,7 @@ check "forgejo-runner: the liveness note is informational, never a WARNING" 1 ""
|
|||
# Its own scratch dir: $WORK is rm -rf'd at :3206, well before this block.
|
||||
FJS_DIR="$(mktemp -d)"
|
||||
FJSW="$FJS_DIR/fjs-note.sh"
|
||||
{ echo 'log() { printf "rig-forgejo-runner: %s\n" "$*"; }'
|
||||
{ printf '%s\n' 'log() { printf "rig-forgejo-runner: %s\\n" "$*"; }'
|
||||
awk '/^forgejo_runner_liveness_note\(\) \{/,/^\}/' "$FJS"
|
||||
} > "$FJSW"
|
||||
check "forgejo-runner: liveness note extracted (guards the awk)" 0 "forgejo_runner_liveness_note() {" \
|
||||
|
|
@ -3441,10 +3441,9 @@ check "forgejo-runner: liveness note extracted (guards the awk)" 0 "forgejo_runn
|
|||
note_for() { bash -c '. "$1"; forgejo_runner_liveness_note "$2"' _ "$FJSW" "$1"; }
|
||||
check "liveness note: an ACTIVE unit is told what active does not prove" 0 "not proof" note_for active
|
||||
check "liveness note: …and is given the remedy" 0 "systemctl restart forgejo-runner" note_for active
|
||||
check "liveness note: an INACTIVE unit gets nothing" 0 "" \
|
||||
bash -c '[ -z "$(bash -c ". \"$1\"; forgejo_runner_liveness_note inactive" _ "$1")" ]' _ "$FJSW"
|
||||
check "liveness note: an ABSENT unit (empty state) gets nothing" 0 "" \
|
||||
bash -c '[ -z "$(bash -c ". \"$1\"; forgejo_runner_liveness_note \"\"" _ "$1")" ]' _ "$FJSW"
|
||||
note_is_empty() { [ -z "$(note_for "$1")" ]; }
|
||||
check "liveness note: an INACTIVE unit gets nothing" 0 "" note_is_empty inactive
|
||||
check "liveness note: an ABSENT unit (empty state) gets nothing" 0 "" note_is_empty ""
|
||||
rm -rf "$FJS_DIR"
|
||||
# The header contract at :25 — no token, no network call — survives this.
|
||||
check "forgejo-runner: status still makes no network call" 1 "" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue