/[jscoverage]/trunk/tests/proxy-bad-response-headers.sh
ViewVC logotype

Diff of /trunk/tests/proxy-bad-response-headers.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 427 by siliconforks, Wed Feb 18 16:08:33 2009 UTC revision 611 by siliconforks, Fri Sep 24 20:47:15 2010 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  #    proxy-bad-response-headers.sh - test jscoverage-server --proxy with bad response headers  #    proxy-bad-response-headers.sh - test jscoverage-server --proxy with bad response headers
3  #    Copyright (C) 2008, 2009 siliconforks.com  #    Copyright (C) 2008, 2009, 2010 siliconforks.com
4  #  #
5  #    This program is free software; you can redistribute it and/or modify  #    This program is free software; you can redistribute it and/or modify
6  #    it under the terms of the GNU General Public License as published by  #    it under the terms of the GNU General Public License as published by
# Line 30  Line 30 
30    
31  trap 'cleanup' 0 1 2 3 15  trap 'cleanup' 0 1 2 3 15
32    
33  export PATH=.:..:$PATH  . ./common.sh
34    
35  if [ -z "$VALGRIND" ]  origin_server_port=`perl unused-port.pl`
36  then  ./http-server-bad-headers $origin_server_port &
   delay=0.2  
 else  
   delay=2  
 fi  
   
 ./http-server-bad-headers &  
37  origin_server_pid=$!  origin_server_pid=$!
38    
39  $VALGRIND jscoverage-server --proxy > OUT 2> ERR &  proxy_server_port=`perl 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  sleep $delay  wait_for_server http://127.0.0.1:${origin_server_port}/ping
44    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

Legend:
Removed from v.427  
changed lines
  Added in v.611

  ViewVC Help
Powered by ViewVC 1.1.24