PATCH: remove backward compat 2/2

Federico G. Schwindt fgsch at lodoss.net
Mon Feb 17 20:43:11 CET 2014


And the tests.

f.-

diff --git a/bin/varnishtest/tests/b00018.vtc b/bin/varnishtest/tests/b00018.vtc
index 3989b57..682c19c 100644
--- a/bin/varnishtest/tests/b00018.vtc
+++ b/bin/varnishtest/tests/b00018.vtc
@@ -9,7 +9,7 @@ varnish v1 -vcl+backend {
 	sub vcl_backend_response {
 	    set beresp.http.Foo = "bar";
 	    set beresp.status = 523;
-	    set beresp.response = "not ok";
+	    set beresp.reason = "not ok";
 	    set beresp.uncacheable = true;
 	    set beresp.ttl = 0s;
 	    return (deliver);
diff --git a/bin/varnishtest/tests/b00019.vtc b/bin/varnishtest/tests/b00019.vtc
index 6b33702..597e8b9 100644
--- a/bin/varnishtest/tests/b00019.vtc
+++ b/bin/varnishtest/tests/b00019.vtc
@@ -28,13 +28,13 @@ varnish v1 -vcl+backend {
 	sub vcl_error {
 		if (req.restarts == 2) {
 			set obj.status = 200;
-			set obj.response = "restart=2";
+			set obj.reason = "restart=2";
 		} elsif (req.restarts > 2) {
 			set obj.status = 501;
-			set obj.response = "restart>2";
+			set obj.reason = "restart>2";
 		} elsif (req.restarts < 2) {
 			set obj.status = 500;
-			set obj.response = "restart<2";
+			set obj.reason = "restart<2";
 		}
 	}
 } -start
diff --git a/bin/varnishtest/tests/b00035.vtc b/bin/varnishtest/tests/b00035.vtc
deleted file mode 100644
index dbe8a6f..0000000
--- a/bin/varnishtest/tests/b00035.vtc
+++ /dev/null
@@ -1,26 +0,0 @@
-varnishtest "{be}req.request compat check"
-
-server s1 {
-	rxreq
-	expect req.method == "GETABCD"
-	txresp
-} -start
-
-varnish v1 -vcl+backend {
-
-	sub vcl_recv {
-		set req.method = req.request + "A";
-		set req.request = req.method + "B";
-		return (pass);
-	}
-
-	sub vcl_backend_fetch {
-		set bereq.method = bereq.request + "C";
-		set bereq.request = bereq.method + "D";
-	}
-} -start
-
-client c1 {
-	txreq
-	rxresp
-} -run
diff --git a/bin/varnishtest/tests/b00036.vtc b/bin/varnishtest/tests/b00036.vtc
index cb0b6e5..4cd6e17 100644
--- a/bin/varnishtest/tests/b00036.vtc
+++ b/bin/varnishtest/tests/b00036.vtc
@@ -9,7 +9,7 @@ server s1 {
 
 varnish v1 -vcl+backend {
 	sub vcl_recv {
-		if (req.request == "PURGE") {
+		if (req.method == "PURGE") {
 			return (purge);
 		}
 	}
diff --git a/bin/varnishtest/tests/r00292.vtc b/bin/varnishtest/tests/r00292.vtc
index f6bc807..4972188 100644
--- a/bin/varnishtest/tests/r00292.vtc
+++ b/bin/varnishtest/tests/r00292.vtc
@@ -18,8 +18,8 @@ server s1 {
 varnish v1 -vcl+backend {
 
 	sub vcl_recv {
-		remove req.http.hdr1;
-		remove req.http.hdr5;
+		unset req.http.hdr1;
+		unset req.http.hdr5;
 	}
 } -start
 
diff --git a/bin/varnishtest/tests/r00494.vtc b/bin/varnishtest/tests/r00494.vtc
index 31a9d6e..cb0bbe8 100644
--- a/bin/varnishtest/tests/r00494.vtc
+++ b/bin/varnishtest/tests/r00494.vtc
@@ -11,7 +11,7 @@ server s1 {
 varnish v1 -vcl+backend {
 	sub vcl_backend_response {
 		set beresp.http.bar = beresp.http.foo;
-		remove beresp.http.foo;
+		unset beresp.http.foo;
 	}
 } -start
 
diff --git a/bin/varnishtest/tests/r00965.vtc b/bin/varnishtest/tests/r00965.vtc
index 72317de..ccd01b5 100644
--- a/bin/varnishtest/tests/r00965.vtc
+++ b/bin/varnishtest/tests/r00965.vtc
@@ -8,7 +8,7 @@ server s1 {
 varnish v1 -vcl+backend {
 	sub vcl_recv {
 		if (req.http.X-Banned == "check") {
-			remove req.http.X-Banned;
+			unset req.http.X-Banned;
 		} elseif (req.restarts == 0) {
 		        set req.http.X-Banned = "check";
 			if (req.http.x-pass) {
diff --git a/bin/varnishtest/tests/v00001.vtc b/bin/varnishtest/tests/v00001.vtc
index 4f77f25..1798ec9 100644
--- a/bin/varnishtest/tests/v00001.vtc
+++ b/bin/varnishtest/tests/v00001.vtc
@@ -1,4 +1,4 @@
-varnishtest "VCL/VRT: url/request/proto/response/status"
+varnishtest "VCL/VRT: url/request/proto/reason/status"
 
 
 server s1 {
@@ -28,14 +28,14 @@ varnish v1 -vcl+backend {
 	}
 	sub vcl_backend_response {
 		set beresp.http.foobar =
-		    beresp.proto + beresp.response + beresp.status;
+		    beresp.proto + beresp.reason + beresp.status;
 		set beresp.proto = "HTTP/1.2";
-		set beresp.response = "For circular files";
+		set beresp.reason = "For circular files";
 		set beresp.status = 903;
 	}
 	sub vcl_deliver {
 		set resp.proto = "HTTP/1.2";
-		set resp.response = "Naah, lets fail it";
+		set resp.reason = "Naah, lets fail it";
 		set resp.status = 904;
 		# XXX should be moved to it's own test
 		set resp.http.x-served-by-hostname = server.hostname;



More information about the varnish-dev mailing list