Permalink
Browse files

More improvements and additions

  • Loading branch information...
1 parent c6854d8 commit f6a1111e03d1ea67fb5fd254d48826e72f06545c @fgsch fgsch committed Jan 11, 2017
Showing with 27 additions and 15 deletions.
  1. +13 −1 bin/varnishtest/tests/u00003.vtc
  2. +2 −4 bin/varnishtest/tests/u00005.vtc
  3. +12 −10 bin/varnishtest/tests/u00006.vtc
@@ -1,4 +1,4 @@
-varnishtest "varnishncsa -F error handling"
+varnishtest "varnishncsa error handling"
server s1 {
rxreq
@@ -7,6 +7,18 @@ server s1 {
varnish v1 -vcl+backend {} -start
+err_shell "Missing -w option" \
+ {varnishncsa -n ${v1_name} -D 2>&1}
+
+err_shell "Unknown format specifier at: %{foo}A" \
+ {varnishncsa -n ${v1_name} -F "%{foo}A" 2>&1}
+
+err_shell "Unknown format specifier at: %A" \
+ {varnishncsa -n ${v1_name} -F "%A" 2>&1}
+
+err_shell "Usage: varnishncsa <options>" \
+ {varnishncsa -n ${v1_name} extra 2>&1}
+
err_shell "Missing tag in VSL:" \
{varnishncsa -n ${v1_name} -F "%{VSL:}x" 2>&1}
@@ -19,7 +19,5 @@ process p5 "exec varnishstat -n ${v1_name} -x" -run
shell {grep -q "<type>MAIN</type>" ${tmpdir}/p5/stdout}
process p6 "exec varnishstat -n ${v1_name} -j" -run
shell {grep -q "MAIN.uptime\":" ${tmpdir}/p6/stdout}
-process p7 "exec varnishstat -n ${v1_name} extra" -run
-shell {grep -q "Usage: varnishstat <options>" ${tmpdir}/p7/stderr}
-process p8 "exec varnishstat -n /nonexistent" -run
-shell {grep -q "Cannot open /nonexistent/_.vsm" ${tmpdir}/p8/stderr}
+err_shell "Usage: varnishstat <options>" "varnishstat -n ${v1_name} extra 2>&1"
+err_shell "Cannot open /nonexistent/_.vsm" "varnishstat -n /nonexistent 2>&1"
@@ -11,17 +11,19 @@ process p1 "exec varnishlog -n ${v1_name} -g raw -k 1" -start
process p2 {
exec varnishlog -n ${v1_name} -g raw -k 1 -w ${tmpdir}/p2/output -A
} -start
-process p3 "exec varnishlog -n ${v1_name} -h" -run
-shell {grep -q "Usage: varnishlog <options>" ${tmpdir}/p3/stderr}
-process p4 "exec varnishlog -n ${v1_name} -V" -run
-shell {grep -q "Copyright (c) 2006 Verdens Gang AS" ${tmpdir}/p4/stderr}
-process p5 "exec varnishlog -n ${v1_name} extra" -run
-shell {grep -q "Usage: varnishlog <options>" ${tmpdir}/p5/stderr}
-process p6 "exec varnishlog -n ${v1_name} -D" -run
-shell {grep -q "Missing -w option" ${tmpdir}/p6/stderr}
-process p7 "exec varnishlog -n ${v1_name} -L 0" -run
-shell {grep -q -- "-L: Range error" ${tmpdir}/p7/stderr}
+process p3 {
+ exec varnishlog -n ${v1_name} -g raw -k 1 -w ${tmpdir}/p3/output.bin
+} -start
+process p4 "exec varnishlog -n ${v1_name} -h" -run
+shell {grep -q "Usage: varnishlog <options>" ${tmpdir}/p4/stderr}
+process p5 "exec varnishlog -n ${v1_name} -V" -run
+shell {grep -q "Copyright (c) 2006 Verdens Gang AS" ${tmpdir}/p5/stderr}
+err_shell "Usage: varnishlog <options>" "varnishlog -n ${v1_name} extra 2>&1"
+err_shell "Missing -w option" "varnishlog -n ${v1_name} -D 2>&1"
+err_shell "-L: Range error" "varnishlog -n ${v1_name} -L 0 2>&1"
process p1 -wait
shell {grep -q "0 CLI" ${tmpdir}/p1/stdout}
process p2 -wait
shell {grep -q "0 CLI" ${tmpdir}/p2/output}
+process p3 -wait
+shell {varnishlog -g raw -r ${tmpdir}/p3/output.bin | grep -q "0 CLI"}

0 comments on commit f6a1111

Please sign in to comment.