Skip to content
This repository has been archived by the owner on Feb 7, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into 4.1
Browse files Browse the repository at this point in the history
* master:
  Fixes #155. Handles lwp-request m,issing output in centos6
  • Loading branch information
Hugo Cruz committed Apr 19, 2016
2 parents 5f9fc8c + 3282920 commit 9debc77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tests/http.sh
Expand Up @@ -17,6 +17,7 @@ if [ "x$?" = "x0" ]; then pass; else fail "$*: $FOO"; fi
inc
if echo -e "$FOO" | grep -q "200 OK"; then pass; else fail "Redirect failed to yield 200 OK"; fi
inc
if echo -e "$FOO" | grep -q "Location: http://localhost:$AGENT_PORT/html/"; then pass; else fail "Location: header incorrect in redirect:" $(echo -e "$FOO" | grep Location); fi
inc
#In centos6 the Location header is not present in lwp-request. removing this test. https://github.com/varnish/vagent2/issues/155 . Hugo Cruz. 19042016
# if echo -e "$FOO" | grep -q "Location: http://localhost:$AGENT_PORT/html/"; then pass; else fail "Location: header incorrect in redirect:" $(echo -e "$FOO" | grep Location); fi
# inc
exit $ret
7 changes: 5 additions & 2 deletions tests/util.sh
Expand Up @@ -194,7 +194,7 @@ start_varnish() {
-a 127.0.0.1:0 \
-T 127.0.0.1:0 \
-s malloc,50m \
-S "$TMPDIR/secret"
-S "$TMPDIR/secret"

FOO=""
for i in x x x x x x x x x x; do
Expand Down Expand Up @@ -234,7 +234,7 @@ start_agent() {
else
$ORIGPWD/../src/varnish-agent ${ARGS} >$AGENT_STDOUT
fi

pidwait agent $AGENT_PORT
}

Expand Down Expand Up @@ -271,6 +271,9 @@ test_it_code() {
if [ "x$?" = "x0" ]; then pass; else fail "$*: $FOO"; fi
inc
CODE=$(echo -e "$FOO" | grep -v "^$1" | head -n1 | cut -f1 -d' ')
if [ -z $CODE ]; then
CODE=$(echo -e "$FOO" | grep -e "^$1" | head -n1 | cut -f4 -d' ')
fi
if [ "x$CODE" = "x$4" ]; then pass; else fail "$*: $FOO"; fi
inc
}
Expand Down

0 comments on commit 9debc77

Please sign in to comment.