From 05f5fe917919310d7d530516cd13aac1bd2718b1 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 15 Oct 2013 16:44:45 +1100 Subject: [PATCH] tests/eventscripts: New tests for 20.multipathd Signed-off-by: Martin Schwenke (This used to be ctdb commit 212d4b201c30804f69cffe4b7150d4b74bf2e54f) --- .../eventscripts/20.multipathd.monitor.001.sh | 11 +++++++ .../eventscripts/20.multipathd.monitor.002.sh | 11 +++++++ .../eventscripts/20.multipathd.monitor.003.sh | 14 +++++++++ .../eventscripts/20.multipathd.monitor.004.sh | 15 +++++++++ ctdb/tests/eventscripts/scripts/local.sh | 23 ++++++++++++++ ctdb/tests/eventscripts/stubs/multipath | 36 ++++++++++++++++++++++ 6 files changed, 110 insertions(+) create mode 100755 ctdb/tests/eventscripts/20.multipathd.monitor.001.sh create mode 100755 ctdb/tests/eventscripts/20.multipathd.monitor.002.sh create mode 100755 ctdb/tests/eventscripts/20.multipathd.monitor.003.sh create mode 100755 ctdb/tests/eventscripts/20.multipathd.monitor.004.sh create mode 100755 ctdb/tests/eventscripts/stubs/multipath diff --git a/ctdb/tests/eventscripts/20.multipathd.monitor.001.sh b/ctdb/tests/eventscripts/20.multipathd.monitor.001.sh new file mode 100755 index 00000000000..4eafefc60bb --- /dev/null +++ b/ctdb/tests/eventscripts/20.multipathd.monitor.001.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "No multipath devices configure to check" + +setup_multipathd + +ok_null + +simple_test diff --git a/ctdb/tests/eventscripts/20.multipathd.monitor.002.sh b/ctdb/tests/eventscripts/20.multipathd.monitor.002.sh new file mode 100755 index 00000000000..fbfe9528430 --- /dev/null +++ b/ctdb/tests/eventscripts/20.multipathd.monitor.002.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "3 multipath devices configure to check, all up" + +setup_multipathd "mpatha" "mpathb" "mpathc" + +ok_null + +simple_test diff --git a/ctdb/tests/eventscripts/20.multipathd.monitor.003.sh b/ctdb/tests/eventscripts/20.multipathd.monitor.003.sh new file mode 100755 index 00000000000..d9a212555e6 --- /dev/null +++ b/ctdb/tests/eventscripts/20.multipathd.monitor.003.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "3 multipath devices configure to check, one down" + +setup_multipathd "mpatha" "!mpathb" "mpathc" + +required_result 1 <