Permalink
Browse files

Improve previous tests and add a few more

  • Loading branch information...
1 parent 9d29b38 commit b5e64a92d1f0d2d3e5017f1adf1baf4bfba6e89f @fgsch fgsch committed Jan 10, 2017
Showing with 25 additions and 3 deletions.
  1. +9 −0 bin/varnishtest/tests/u00005.vtc
  2. +16 −3 bin/varnishtest/tests/u00006.vtc
@@ -8,9 +8,18 @@ server s1 {
varnish v1 -vcl+backend {} -start
process p1 "exec varnishstat -n ${v1_name} -h" -run
+shell {grep -q "Usage: varnishstat <options>" ${tmpdir}/p1/stderr}
process p2 "exec varnishstat -n ${v1_name} -l" -run
+shell {grep -q "Varnishstat -f option fields:" ${tmpdir}/p2/stdout}
process p3 "exec varnishstat -n ${v1_name} -V" -run
+shell {grep -q "Copyright (c) 2006 Verdens Gang AS" ${tmpdir}/p3/stderr}
process p4 "exec varnishstat -n ${v1_name} -1" -run
+shell {grep -q "MAIN.uptime" ${tmpdir}/p4/stdout}
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}
@@ -8,7 +8,20 @@ server s1 {
varnish v1 -vcl+backend {} -start
process p1 "exec varnishlog -n ${v1_name} -g raw -k 1" -start
-process p2 "exec varnishlog -n ${v1_name} -h" -run
-process p3 "exec varnishlog -n ${v1_name} -V" -run
-process p4 "exec varnishlog -n ${v1_name} extra" -run
+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 p1 -wait
+shell {grep -q "0 CLI" ${tmpdir}/p1/stdout}
+process p2 -wait
+shell {grep -q "0 CLI" ${tmpdir}/p2/output}

0 comments on commit b5e64a9

Please sign in to comment.