Files
routewatch/script/test
clawbot b0cd884019 Skip live network feed test under -short for deterministic make check (closes #2)
TestRouteWatchLiveFeed streams the live RIPE RIS feed for a few seconds, so
the default test run depended on the network and tripped the race detector.
It now skips under testing.Short(), and script/test passes -short in both
go test lines, so make check runs offline and gives the same result every
time. The README says how to run the live test on demand. No non-test code
changed.

The race itself is not fixed: the test reads the peeringHandler field of
RouteWatch while Run is still setting it. Nothing outside the test reads
that field concurrently.

Model: opus-4-8 (implementation, review); fable-5-1 (summary)
2026-09-21 09:05:33 +02:00

18 lines
395 B
Bash
Executable File

#!/bin/sh
# script/test: run the test suite. On failure, rerun verbosely so the
# failing tests are visible in the output.
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
main() {
cd "$ROOT"
go test -short -timeout 30s -race -cover ./... || {
echo "--- Rerunning with -v for details ---"
go test -short -timeout 30s -race -v ./...
exit 1
}
}
main "$@"