1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

test: Test monitoring HTTP fetching

This patch adds HTTP fetching to the integration tests.

It checks that the URLs are properly exported and that the server
replies reasonably to them. The contents are saved as they might be
useful as a debugging aid.

They're added to t-09-loop as it already was doing other HTTP fetches,
but the changes are not particularly tied to it.

The content of the pages is not checked yet, that might come in
subsequent patches.
This commit is contained in:
Alberto Bertogli
2018-03-02 15:19:54 +00:00
parent 83e40da3f6
commit 407f7cf79a

View File

@@ -32,6 +32,17 @@ wait_until_ready 2025
run_msmtp aliasB@srv-B < content
# Get some of the debugging pages, for troubleshooting, and to make sure they
# work reasonably well.
wget -q -o /dev/null -O .data-A/dbg-root http://localhost:1099/ \
|| fail "failed to fetch /"
wget -q -o /dev/null -O .data-A/dbg-flags http://localhost:1099/debug/flags \
|| fail "failed to fetch /debug/flags"
wget -q -o /dev/null -O .data-A/dbg-queue http://localhost:1099/debug/queue \
|| fail "failed to fetch /debug/queue"
wget -q -o /dev/null -O .data-A/dbg-root http://localhost:1099/404 \
&& fail "fetch /404 worked, should have failed"
# Wait until one of them has noticed and stopped the loop.
while sleep 0.1; do
wget -q -o /dev/null -O .data-A/vars http://localhost:1099/debug/vars