[master] fcf43a9 And the actual *req.hash test
Federico G. Schwindt
fgsch at lodoss.net
Tue Aug 22 02:23:05 CEST 2017
commit fcf43a93243d4f6ce9d1a8c2dcc1dc22f5de368f
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Tue Aug 22 01:20:20 2017 +0100
And the actual *req.hash test
diff --git a/bin/varnishtest/tests/b00051.vtc b/bin/varnishtest/tests/b00051.vtc
new file mode 100644
index 0000000..1863850
--- /dev/null
+++ b/bin/varnishtest/tests/b00051.vtc
@@ -0,0 +1,22 @@
+varnishtest "Test req.hash and bereq.hash"
+
+server s1 {
+ rxreq
+ txresp
+} -start
+
+varnish v1 -vcl+backend {
+ sub vcl_backend_response {
+ set beresp.http.bereq_hash = bereq.hash;
+ }
+ sub vcl_deliver {
+ set resp.http.req_hash = req.hash;
+ }
+} -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.http.req_hash ~ "[[:xdigit:]]{64}"
+ expect resp.http.req_hash == resp.http.bereq_hash
+} -run
More information about the varnish-commit
mailing list