summaryrefslogtreecommitdiffstats
path: root/tests/smtp_ingress-clean.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/smtp_ingress-clean.sh')
-rw-r--r--tests/smtp_ingress-clean.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/smtp_ingress-clean.sh b/tests/smtp_ingress-clean.sh
index 0cf7943..791a979 100644
--- a/tests/smtp_ingress-clean.sh
+++ b/tests/smtp_ingress-clean.sh
@@ -27,6 +27,22 @@
# # After test, cleanup with
# $ bash dmz-clean.sh
+trap 'fail' ERR
+
+pass() {
+ echo "Hooray!"
+ set +x #echo off
+ exit 0
+}
+
+# Use this to trigger fail() at the right places
+# if [ "$RESULT" == "Test Failed!" ]; then fail; fi
+fail() {
+ echo "Test Failed!"
+ set +x
+ exit 1
+}
+
if [ $# -eq 1 ]; then
if [ $1 == "debug" ]; then
set -x #echo on
@@ -89,4 +105,4 @@ neutron subnet-delete test_internal
echo "Delete internal network"
neutron net-delete test_internal
-set +x #echo off
+pass