[master] 5aede725f add test

Nils Goroll nils.goroll at uplex.de
Wed Apr 1 08:33:07 UTC 2020


commit 5aede725f875e575c7884dc80cc130cd98c26c23
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date:   Fri Mar 20 12:02:31 2020 -0700

    add test

diff --git a/bin/varnishtest/tests/u00015.vtc b/bin/varnishtest/tests/u00015.vtc
new file mode 100644
index 000000000..ec415e19f
--- /dev/null
+++ b/bin/varnishtest/tests/u00015.vtc
@@ -0,0 +1,19 @@
+varnishtest "varnishstat -j"
+
+server s1 -repeat 5 {
+	rxreq
+	txresp
+} -start
+
+varnish v1 -vcl+backend {} -start
+
+client c1 -repeat 5 {
+	txreq
+	rxresp
+} -run
+
+delay 1
+
+shell { varnishstat -n ${v1_name}  -j }
+shell -expect "1" { varnishstat -n ${v1_name} -j | python3 -c 'import sys, json; print(json.load(sys.stdin)["version"])' }
+shell -expect "5" { varnishstat -n ${v1_name} -j | python3 -c 'import sys, json; print(json.load(sys.stdin)["counters"]["MAIN.client_req"]["value"])' }


More information about the varnish-commit mailing list