diff --git a/test/go.mod b/test/go.mod index c7f4db16..e59fcaea 100644 --- a/test/go.mod +++ b/test/go.mod @@ -104,5 +104,6 @@ require ( tool ( github.com/TecharoHQ/anubis/cmd/anubis + github.com/TecharoHQ/anubis/utils/cmd/backoff-retry github.com/jsha/minica ) diff --git a/test/robots_txt/tekton.sh b/test/robots_txt/tekton.sh index 31eb4f34..c90736eb 100755 --- a/test/robots_txt/tekton.sh +++ b/test/robots_txt/tekton.sh @@ -4,4 +4,20 @@ set -euo pipefail cd "$(dirname "$0")" -exec ./test.sh +function cleanup() { + pkill -P $$ +} + +trap cleanup EXIT SIGINT + +go tool anubis --help 2>/dev/null || : + +go run ../cmd/unixhttpd & + +go tool anubis \ + --policy-fname ./anubis.yaml \ + --use-remote-address \ + --serve-robots-txt \ + --target=unix://$(pwd)/unixhttpd.sock & + +go tool backoff-retry node ./test.mjs