From e78d2cbff2e30dbea4a7d05bab8f8a5fedfebd79 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 22 Aug 2017 16:37:30 +1000 Subject: ctdb-tests: Improve releaseip connection resetting tests Make the tests more general by setting up the IP address using a "takeip" event. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/tests/eventscripts/10.interface.010.sh | 23 ++++++++++++++ ctdb/tests/eventscripts/10.interface.011.sh | 28 +++++++++++++++++ ctdb/tests/eventscripts/10.interface.012.sh | 31 +++++++++++++++++++ ctdb/tests/eventscripts/10.interface.013.sh | 36 ++++++++++++++++++++++ .../eventscripts/10.interface.releaseip.010.sh | 22 ------------- .../eventscripts/10.interface.releaseip.011.sh | 27 ---------------- .../eventscripts/10.interface.releaseip.012.sh | 30 ------------------ .../eventscripts/10.interface.releaseip.013.sh | 35 --------------------- 8 files changed, 118 insertions(+), 114 deletions(-) create mode 100755 ctdb/tests/eventscripts/10.interface.010.sh create mode 100755 ctdb/tests/eventscripts/10.interface.011.sh create mode 100755 ctdb/tests/eventscripts/10.interface.012.sh create mode 100755 ctdb/tests/eventscripts/10.interface.013.sh delete mode 100755 ctdb/tests/eventscripts/10.interface.releaseip.010.sh delete mode 100755 ctdb/tests/eventscripts/10.interface.releaseip.011.sh delete mode 100755 ctdb/tests/eventscripts/10.interface.releaseip.012.sh delete mode 100755 ctdb/tests/eventscripts/10.interface.releaseip.013.sh diff --git a/ctdb/tests/eventscripts/10.interface.010.sh b/ctdb/tests/eventscripts/10.interface.010.sh new file mode 100755 index 00000000000..f5fa0622582 --- /dev/null +++ b/ctdb/tests/eventscripts/10.interface.010.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "Release 1 IP, 10 connections killed OK" + +setup_ctdb + +ctdb_get_1_public_address | +while read dev ip bits ; do + ok_null + simple_test_event "takeip" $dev $ip $bits + + count=10 + setup_tcp_connections $count \ + "$ip" 445 10.254.254.0 12300 + + ok <