[master] 412961a Polish shell usage in test cases
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Sat Feb 4 18:27:04 CET 2017
commit 412961ab472cf3c3c2fdb7c99fc5376e47108c4d
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Sat Feb 4 18:24:22 2017 +0100
Polish shell usage in test cases
Make use of the ${v*_name} macro and retire redundant redirections.
diff --git a/bin/varnishtest/tests/b00041.vtc b/bin/varnishtest/tests/b00041.vtc
index 7c004e7..2fd2690 100644
--- a/bin/varnishtest/tests/b00041.vtc
+++ b/bin/varnishtest/tests/b00041.vtc
@@ -2,4 +2,4 @@ varnishtest "Test varnishadm and the Telnet CLI"
varnish v1 -vcl {backend foo { .host = "127.0.0.1"; } } -start
-shell "varnishadm -n ${tmpdir}/v1 help > /dev/null"
+shell "varnishadm -n ${v1_name} help > /dev/null"
diff --git a/bin/varnishtest/tests/b00045.vtc b/bin/varnishtest/tests/b00045.vtc
index 74d18f3..8863bad 100644
--- a/bin/varnishtest/tests/b00045.vtc
+++ b/bin/varnishtest/tests/b00045.vtc
@@ -15,4 +15,4 @@ client c1 {
delay .2
shell -err -expect {Could not open pid/lock} \
- "varnishd -P ${tmpdir}/v1/varnishd.pid -b 127.0.0.1:80 -a :0 -n ${tmpdir} 2>&1"
+ "varnishd -P ${v1_name}/varnishd.pid -b 127.0.0.1:80 -a :0 -n ${tmpdir}"
diff --git a/bin/varnishtest/tests/j00003.vtc b/bin/varnishtest/tests/j00003.vtc
index e67589e..596ce41 100644
--- a/bin/varnishtest/tests/j00003.vtc
+++ b/bin/varnishtest/tests/j00003.vtc
@@ -2,11 +2,11 @@ varnishtest "-junix bad subarg handling"
feature root
-shell -err -expect "unknown sub-argument" "varnishd -junix,bla=foo -f '' 2>&1"
-shell -err -expect "user not found" "varnishd -junix,user=/// -f '' 2>&1"
-shell -err -expect "user not found" "varnishd -junix,workuser=/// -f '' 2>&1"
-shell -err -expect "group not found" "varnishd -junix,ccgroup=/// -f '' 2>&1"
+shell -err -expect "unknown sub-argument" "varnishd -junix,bla=foo -f ''"
+shell -err -expect "user not found" "varnishd -junix,user=/// -f ''"
+shell -err -expect "user not found" "varnishd -junix,workuser=/// -f ''"
+shell -err -expect "group not found" "varnishd -junix,ccgroup=/// -f ''"
feature user_varnish
-shell -err -expect "have different login groups" "varnishd -junix,workuser=root -f '' 2>&1"
+shell -err -expect "have different login groups" "varnishd -junix,workuser=root -f ''"
diff --git a/bin/varnishtest/tests/u00003.vtc b/bin/varnishtest/tests/u00003.vtc
index 2f4e188..cab8750 100644
--- a/bin/varnishtest/tests/u00003.vtc
+++ b/bin/varnishtest/tests/u00003.vtc
@@ -67,7 +67,7 @@ client c1 {
delay 1
-shell "mv ${tmpdir}/ncsa.log ${tmpdir}/ncsa.old.log >/dev/null 2>&1"
+shell "mv ${tmpdir}/ncsa.log ${tmpdir}/ncsa.old.log"
shell "kill -HUP `cat ${tmpdir}/ncsa.pid`"
client c1 {
diff --git a/bin/varnishtest/tests/u00006.vtc b/bin/varnishtest/tests/u00006.vtc
index 9b6f83f..1514a87 100644
--- a/bin/varnishtest/tests/u00006.vtc
+++ b/bin/varnishtest/tests/u00006.vtc
@@ -52,7 +52,7 @@ client c1 {
delay 1
-shell "mv ${tmpdir}/vlog.bin ${tmpdir}/vlog.bin~ >/dev/null 2>&1"
+shell "mv ${tmpdir}/vlog.bin ${tmpdir}/vlog.bin~"
shell "kill -HUP `cat ${tmpdir}/vlog.pid`"
client c1 {
More information about the varnish-commit
mailing list