[master] 328c18e Test VCL-label loop detection
Poul-Henning Kamp
phk at FreeBSD.org
Wed Jan 11 11:30:05 CET 2017
commit 328c18e836b0b17ce02ddaa79548c0daf848023e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Jan 11 10:28:47 2017 +0000
Test VCL-label loop detection
diff --git a/bin/varnishtest/tests/v00048.vtc b/bin/varnishtest/tests/v00048.vtc
index 68dedcf..67cd3a9 100644
--- a/bin/varnishtest/tests/v00048.vtc
+++ b/bin/varnishtest/tests/v00048.vtc
@@ -107,3 +107,23 @@ varnish v1 -cliok "vcl.label snarf vcl1"
server s1 -start
client c1 -run
+# Test loop detection
+#######################################################################
+
+varnish v1 -cliok vcl.list
+
+varnish v1 -vcl+backend { }
+
+varnish v1 -cliok "vcl.label lblA vcl3"
+
+varnish v1 -vcl+backend { sub vcl_recv { return (vcl(lblA)); } }
+
+varnish v1 -cliok "vcl.label lblB vcl4"
+
+varnish v1 -vcl+backend { sub vcl_recv { return (vcl(lblB)); } }
+
+varnish v1 -clierr 106 "vcl.label lblA vcl5"
+varnish v1 -cliexpect \
+ {can only be used from the active VCL} \
+ {vcl.label lblA vcl5}
+
More information about the varnish-commit
mailing list