[master] e5edb7c Simplify "Should not happen" checks
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Sat Feb 4 09:50:05 CET 2017
commit e5edb7ccebad52b7e03c399ec2bd4c8ced04ccb3
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Sat Feb 4 09:45:52 2017 +0100
Simplify "Should not happen" checks
Suggested by Federico.
diff --git a/bin/varnishtest/tests/m00022.vtc b/bin/varnishtest/tests/m00022.vtc
index 11ba4cf..7a2299a 100644
--- a/bin/varnishtest/tests/m00022.vtc
+++ b/bin/varnishtest/tests/m00022.vtc
@@ -34,11 +34,7 @@ varnish v1 -errvcl "Planned failure in vcl_init" {
logexpect l1 -wait
-shell {
- set -e
- varnishlog -n ${v1_name} -d -g raw >v1.log
- ! grep "Should not happen" v1.log
-}
+shell -match "^$" {varnishlog -n ${v1_name} -d -g raw -I "Should not happen"}
varnish v1 -cliok "param.set nuke_limit 42"
diff --git a/bin/varnishtest/tests/m00027.vtc b/bin/varnishtest/tests/m00027.vtc
index daadeab..d419b78 100644
--- a/bin/varnishtest/tests/m00027.vtc
+++ b/bin/varnishtest/tests/m00027.vtc
@@ -18,8 +18,4 @@ varnish v1 -errvcl "Missing dynamic backend address or port" {
}
}
-shell {
- set -e
- varnishlog -n ${v1_name} -d -g raw >v1.log
- ! grep "Should not happen" v1.log
-}
+shell -match "^$" {varnishlog -n ${v1_name} -d -g raw -I "Should not happen"}
More information about the varnish-commit
mailing list