TestRouteWatchLiveFeed streams the live RIPE RIS feed for about five seconds, which made make check nondeterministic and network-dependent. Guard it with a testing.Short() skip and pass -short in both go test lines of script/test, so the default suite runs offline and deterministically. The README documents how to run the live test on demand. Test-only change; no production behavior changes. Model: opus-4-8
18 lines
395 B
Bash
Executable File
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 "$@"
|