[master] 2fc4064 Test-case improvements.

Poul-Henning Kamp phk at varnish-cache.org
Thu Oct 25 10:10:33 CEST 2012


commit 2fc4064dca0e7e58fb2b70d883cde0cccf2873b7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Oct 25 08:10:00 2012 +0000

    Test-case improvements.
    
    Submitted by:	Federico G. Schwindt

diff --git a/bin/varnishtest/tests/r00263.vtc b/bin/varnishtest/tests/r00263.vtc
index d97ec70..79df874 100644
--- a/bin/varnishtest/tests/r00263.vtc
+++ b/bin/varnishtest/tests/r00263.vtc
@@ -1,6 +1,6 @@
 varnishtest "Test refcounting backends from director"
 
-varnish v1  -vcl+backend {
+varnish v1  -vcl {
 	backend node1 { .host = "10.0.0.1"; .port = "80"; }
 	backend node2 { .host = "10.0.0.2"; .port = "80"; }
 	backend node3 { .host = "10.0.0.3"; .port = "80"; }
diff --git a/bin/varnishtest/tests/r00310.vtc b/bin/varnishtest/tests/r00310.vtc
index 5a7d98a..6a5ce22 100644
--- a/bin/varnishtest/tests/r00310.vtc
+++ b/bin/varnishtest/tests/r00310.vtc
@@ -1,6 +1,6 @@
 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"; }
 
 	sub vcl_hit {
diff --git a/bin/varnishtest/tests/r00409.vtc b/bin/varnishtest/tests/r00409.vtc
index 4857fff..80acd34 100644
--- a/bin/varnishtest/tests/r00409.vtc
+++ b/bin/varnishtest/tests/r00409.vtc
@@ -1,6 +1,7 @@
 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 {
 		if ( req.url ~ ! "\.(png|jpg|gif|js|css)$" ) {
 			return (pass);
diff --git a/bin/varnishtest/tests/r00655.vtc b/bin/varnishtest/tests/r00655.vtc
index c788219..6363914 100644
--- a/bin/varnishtest/tests/r00655.vtc
+++ b/bin/varnishtest/tests/r00655.vtc
@@ -1,7 +1,6 @@
 varnishtest "Test nested /*...*/ comments "
 
-
-varnish v1 -badvcl {
+varnish v1 -errvcl {/* ... */ comment contains /*} {
 
 	/* foo
 		/* bar
diff --git a/bin/varnishtest/tests/r00916.vtc b/bin/varnishtest/tests/r00916.vtc
index bf2ee63..27f3f1a 100644
--- a/bin/varnishtest/tests/r00916.vtc
+++ b/bin/varnishtest/tests/r00916.vtc
@@ -5,7 +5,8 @@ server s1 {
 	txresp -body "FOO"
 } -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 vcl_fetch {
diff --git a/bin/varnishtest/tests/r00936.vtc b/bin/varnishtest/tests/r00936.vtc
index 544245a..176cc7c 100644
--- a/bin/varnishtest/tests/r00936.vtc
+++ b/bin/varnishtest/tests/r00936.vtc
@@ -5,7 +5,7 @@ server s1 {
 	txresp
 } -start
 
-varnish v1 -badvcl {
+varnish v1 -errvcl {'synthetic': not a valid action in method 'vcl_recv'} {
 	backend foo { .host = "127.0.0.1"; }
 
 	sub vcl_recv {
diff --git a/bin/varnishtest/tests/r00971.vtc b/bin/varnishtest/tests/r00971.vtc
index f8b57f0..232f568 100644
--- a/bin/varnishtest/tests/r00971.vtc
+++ b/bin/varnishtest/tests/r00971.vtc
@@ -1,7 +1,7 @@
 
 varnishtest "Test DNS director order"
 
-varnish v1 -vcl+backend {
+varnish v1 -vcl {
 	
 	backend test {
 		.host = "192.168.0.1";
diff --git a/bin/varnishtest/tests/r01027.vtc b/bin/varnishtest/tests/r01027.vtc
index 6c20b00..347f623 100644
--- a/bin/varnishtest/tests/r01027.vtc
+++ b/bin/varnishtest/tests/r01027.vtc
@@ -1,6 +1,7 @@
 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 {
 		error 201 "ok";
 	}
diff --git a/bin/varnishtest/tests/r01144.vtc b/bin/varnishtest/tests/r01144.vtc
index b08060d..dcd1505 100644
--- a/bin/varnishtest/tests/r01144.vtc
+++ b/bin/varnishtest/tests/r01144.vtc
@@ -24,7 +24,7 @@ client c1 {
 	expect resp.status == 200
 } -run
 
-varnish v1 -badvcl {
+varnish v1 -errvcl {Expected ID got '0'} {
 	backend 0fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
 	{
 		.host = "127.0.0.1";



More information about the varnish-commit mailing list