summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-10-12 14:44:03 +1100
committerMartin Schwenke <martins@samba.org>2017-10-18 10:19:48 +0200
commit3bc8880ea0532abed1db002710d3dd6a91f750dc (patch)
tree235c60684f90c8ad9c80f1ae4bd644e070dc8051 /ctdb
parent7720ca0729b127a93d78401aaf1341d79f9603a4 (diff)
downloadsamba-3bc8880ea0532abed1db002710d3dd6a91f750dc.tar.gz
ctdb-tests: Add tests for event scripts with multiple '.'s
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13070 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Wed Oct 18 10:19:48 CEST 2017 on sn-devel-144
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/tests/cunit/run_event_001.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/ctdb/tests/cunit/run_event_001.sh b/ctdb/tests/cunit/run_event_001.sh
index f0ffe4ff0c6..35c256b6fcd 100755
--- a/ctdb/tests/cunit/run_event_001.sh
+++ b/ctdb/tests/cunit/run_event_001.sh
@@ -37,6 +37,27 @@ required_result 1 <<EOF
EOF
unit_test test -x "${scriptdir}/prog"
+cat > "$scriptdir/10.test.rpmnew" <<EOF
+#!/bin/sh
+
+echo hello
+EOF
+chmod +x "$scriptdir/10.test.rpmnew"
+
+# Invalid script with multiple '.'s
+ok <<EOF
+No event scripts found
+EOF
+unit_test run_event_test "$scriptdir" list
+
+ok <<EOF
+Script disable 10.test.rpmnew completed with result=22
+EOF
+unit_test run_event_test "$scriptdir" disable 10.test.rpmnew
+
+ok_null
+unit_test test -x "${scriptdir}/10.test.rpmnew"
+
cat > "$scriptdir/11.foo" <<EOF
#!/bin/sh