32 |
|
|
33 |
. ./common.sh |
. ./common.sh |
34 |
|
|
35 |
./http-server-bad-headers & |
origin_server_port=`unused-port.pl` |
36 |
|
./http-server-bad-headers $origin_server_port & |
37 |
origin_server_pid=$! |
origin_server_pid=$! |
38 |
|
|
39 |
$VALGRIND jscoverage-server --proxy > OUT 2> ERR & |
proxy_server_port=`unused-port.pl` |
40 |
|
$VALGRIND jscoverage-server --port=$proxy_server_port --proxy > OUT 2> ERR & |
41 |
proxy_server_pid=$! |
proxy_server_pid=$! |
|
proxy_server_port=8080 |
|
42 |
|
|
43 |
wait_for_server http://127.0.0.1:8000/ping |
wait_for_server http://127.0.0.1:${origin_server_port}/ping |
44 |
wait_for_server http://127.0.0.1:8080/jscoverage.html |
wait_for_server http://127.0.0.1:{$proxy_server_port}/jscoverage.html |
45 |
|
|
46 |
echo 502 > EXPECTED |
echo 502 > EXPECTED |
47 |
! curl -f -w '%{http_code}\n' -x 127.0.0.1:8080 http://127.0.0.1:8000/index.html 2> /dev/null > ACTUAL |
! curl -f -w '%{http_code}\n' -x 127.0.0.1:${proxy_server_port} http://127.0.0.1:${origin_server_port}/index.html 2> /dev/null > ACTUAL |
48 |
diff EXPECTED ACTUAL |
diff EXPECTED ACTUAL |