Files
austinried 592c522244 tidy the integration harness and its comments
Trim the explanatory comments to short quirk notes, drop the module headers, and fail cleanly: navidrome/gonic now kill their process if they never become ready and the entrypoint always tears down. The prune test waits for the removal to appear in the album list rather than for the scan flag. Correct the AGENTS token-auth note (lms answers 42, Nextcloud 41) and give CI more headroom.
2026-10-04 00:30:05 +00:00

14 lines
520 B
Nu

export def poll [label: string, check: closure, --attempts (-n): int = 120] {
for attempt in 0..<$attempts {
let value = (try { do $check } catch { null })
if $value != null { return $value }
if $attempt > 0 and ($attempt mod 5) == 0 { print $"waiting for ($label)..." }
sleep 1sec
}
error make { msg: $"timed out waiting for ($label)" }
}
export def port-in-use [port: int] {
(^curl -s -o /dev/null --max-time 1 $"http://127.0.0.1:($port)/" | complete).exit_code != 7
}