From: phk Date: Tue, 24 Jun 2008 10:04:08 +0000 (+0000) Subject: Add a testcase for starting with some bad listen sockets. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e96c0fb7aba99a44120582d5bdb8bcff11d0b022;p=varnish Add a testcase for starting with some bad listen sockets. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2784 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/c00003.vtc b/varnish-cache/bin/varnishtest/tests/c00003.vtc new file mode 100644 index 00000000..e90e2c37 --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/c00003.vtc @@ -0,0 +1,22 @@ +# Test that we get anything through at all +# +# $Id$ + +test "Check that we start if one listen address works" + +varnish v1 -accept ":9081 127.0.0.2:9082" -arg "-b 127.0.0.1:9080" -start + +server s1 { + rxreq + txresp -hdr "Connection: close" -body "012345\n" +} -start + +client c1 { + txreq -url "/" + rxresp + expect resp.status == 200 +} -run + +server s1 -wait + +varnish v1 -stop diff --git a/varnish-cache/bin/varnishtest/vtc_varnish.c b/varnish-cache/bin/varnishtest/vtc_varnish.c index bb290d2f..2d3cff44 100644 --- a/varnish-cache/bin/varnishtest/vtc_varnish.c +++ b/varnish-cache/bin/varnishtest/vtc_varnish.c @@ -190,7 +190,7 @@ varnish_launch(struct varnish *v) AN(vsb); vsb_printf(vsb, "cd ../varnishd &&"); vsb_printf(vsb, " ./varnishd -d -d -n %s", v->name); - vsb_printf(vsb, " -a %s -T %s", v->accept, v->telnet); + vsb_printf(vsb, " -a '%s' -T %s", v->accept, v->telnet); vsb_printf(vsb, " %s", v->args); vsb_finish(vsb); AZ(vsb_overflowed(vsb));