]> git.scottworley.com Git - hellowebpy/blob - tests/says-hello.sh
A minimal "hello world" python web server
[hellowebpy] / tests / says-hello.sh
1 #!/bin/sh
2
3 set -eu
4
5 python3 hellowebpy.py &
6 pid=$!
7
8 exit_status=1
9
10 for _ in $(seq 10);do
11 if curl --max-time 2 http://localhost:8080 | grep 'Hello Web';then
12 echo SUCCESS
13 exit_status=0
14 break
15 fi
16 sleep 1
17 done
18
19 kill "$pid"
20 exit "$exit_status"