tests: Add an HTTP integration test
1 unresolved thread
1 unresolved thread
This commit adds an HTTP integration test that performs an HTTP GET request on a dummy server that simply returns the client address.
The purpose of this is to test connectivity to hosts in localhost.
See #120 (closed), #111
Merge request reports
Activity
requested review from @ahf
- tests/http.sh 0 → 100755
1 #!/usr/bin/env bash 2 3 set -euo pipefail 4 5 echo -n "starting HTTP server ... " 6 ./tests/httpd.py &> /dev/null & 7 pid=$! 8 sleep 1 9 echo "ok (pid: $pid)" 10 11 echo -n "performing a simple HTTP request ... " 12 resp=$(curl --silent "http://127.0.0.1:8080") 13 if [[ "$resp" != "127.0.0.1" ]]; then 14 echo "error: did not received a 127.0.0.1 back" 15 kill -9 $pid added Project label
mentioned in commit 777a3492
Please register or sign in to reply