diff options
author | Martin Schwenke <martin@meltin.net> | 2011-08-22 16:37:22 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2011-08-30 16:51:55 +1000 |
commit | 9b8e25d03b911bb628f906025060397d73f131b3 (patch) | |
tree | ccc45f5b5d04ed93cd6b34861222a563e5a9d8f6 | |
parent | fe730830a7c994d04824bfd7e0f909b008573880 (diff) | |
download | samba-9b8e25d03b911bb628f906025060397d73f131b3.tar.gz samba-9b8e25d03b911bb628f906025060397d73f131b3.tar.xz samba-9b8e25d03b911bb628f906025060397d73f131b3.zip |
Tests - eventscripts - new Samba TCP port checking test - no nmap
This one should fall back to netstat.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0a08068f736efe56b4799e1f1f90539d257deb71)
-rwxr-xr-x | ctdb/tests/eventscripts/simple/50.samba.monitor.110.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ctdb/tests/eventscripts/simple/50.samba.monitor.110.sh b/ctdb/tests/eventscripts/simple/50.samba.monitor.110.sh new file mode 100755 index 0000000000..ca30d16fba --- /dev/null +++ b/ctdb/tests/eventscripts/simple/50.samba.monitor.110.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +. "${EVENTSCRIPTS_TESTS_DIR}/common.sh" + +define_test "port 139 down, ctdb checktcpport/nmap not implemented, debug" + +ctdb_not_implemented "checktcpport" +export FAKE_NMAP_NOT_FOUND="yes" + +# This has to go before the setup, otherwise it will write a dud file. +export CTDB_DEBUGLEVEL=4 + +setup_nmap_output_filter + +setup_samba +tcp_port_down 139 + +required_result 1 <<EOF +DEBUG: ctdb_check_ports - checker ctdb not implemented +DEBUG: output from checker was: +DEBUG: ctdb checktcpport 445 (exited with 0) with output: +$ctdb_not_implemented +DEBUG: ctdb_check_ports - checker nmap not implemented +DEBUG: output from checker was: +DEBUG: sh: nmap: command not found +ERROR: samba tcp port 139 is not responding +DEBUG: netstat -l -t -n shows this output: +DEBUG: Active Internet connections (servers only) +DEBUG: Proto Recv-Q Send-Q Local Address Foreign Address State +DEBUG: tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN +EOF + +simple_test |