Commit 2fc4064d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Test-case improvements.

Submitted by:	Federico G. Schwindt
parent 6434572b
varnishtest "Test refcounting backends from director" varnishtest "Test refcounting backends from director"
varnish v1 -vcl+backend { varnish v1 -vcl {
backend node1 { .host = "10.0.0.1"; .port = "80"; } backend node1 { .host = "10.0.0.1"; .port = "80"; }
backend node2 { .host = "10.0.0.2"; .port = "80"; } backend node2 { .host = "10.0.0.2"; .port = "80"; }
backend node3 { .host = "10.0.0.3"; .port = "80"; } backend node3 { .host = "10.0.0.3"; .port = "80"; }
......
varnishtest "Test obj.http.x-cache in vcl_hit" varnishtest "Test obj.http.x-cache in vcl_hit"
varnish v1 -badvcl { varnish v1 -errvcl {'obj.http.x-cache': cannot be set in method 'vcl_hit'.} {
backend foo { .host = "localhost"; } backend foo { .host = "localhost"; }
sub vcl_hit { sub vcl_hit {
......
varnishtest "Regression test for ticket 409" varnishtest "Regression test for ticket 409"
varnish v1 -badvcl { varnish v1 -errvcl {Expected CSTR got '!'} {
backend b { .host = "127.0.0.1"; }
sub vcl_recv { sub vcl_recv {
if ( req.url ~ ! "\.(png|jpg|gif|js|css)$" ) { if ( req.url ~ ! "\.(png|jpg|gif|js|css)$" ) {
return (pass); return (pass);
......
varnishtest "Test nested /*...*/ comments " varnishtest "Test nested /*...*/ comments "
varnish v1 -errvcl {/* ... */ comment contains /*} {
varnish v1 -badvcl {
/* foo /* foo
/* bar /* bar
......
...@@ -5,7 +5,8 @@ server s1 { ...@@ -5,7 +5,8 @@ server s1 {
txresp -body "FOO" txresp -body "FOO"
} -start } -start
varnish v1 -badvcl { varnish v1 -errvcl {Symbol not found: 's-1' (expected type BACKEND)} {
backend b { .host = "127.0.0.1"; }
sub s1 { sub s1 {
} }
sub vcl_fetch { sub vcl_fetch {
......
...@@ -5,7 +5,7 @@ server s1 { ...@@ -5,7 +5,7 @@ server s1 {
txresp txresp
} -start } -start
varnish v1 -badvcl { varnish v1 -errvcl {'synthetic': not a valid action in method 'vcl_recv'} {
backend foo { .host = "127.0.0.1"; } backend foo { .host = "127.0.0.1"; }
sub vcl_recv { sub vcl_recv {
......
varnishtest "Test DNS director order" varnishtest "Test DNS director order"
varnish v1 -vcl+backend { varnish v1 -vcl {
backend test { backend test {
.host = "192.168.0.1"; .host = "192.168.0.1";
......
varnishtest "Test if you can error in vcl_deliver" varnishtest "Test if you can error in vcl_deliver"
varnish v1 -badvcl { varnish v1 -errvcl {'error': not a valid action in method 'vcl_deliver'} {
backend b { .host = "127.0.0.1"; }
sub vcl_deliver { sub vcl_deliver {
error 201 "ok"; error 201 "ok";
} }
......
...@@ -24,7 +24,7 @@ client c1 { ...@@ -24,7 +24,7 @@ client c1 {
expect resp.status == 200 expect resp.status == 200
} -run } -run
varnish v1 -badvcl { varnish v1 -errvcl {Expected ID got '0'} {
backend 0fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 backend 0fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
{ {
.host = "127.0.0.1"; .host = "127.0.0.1";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment