summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2017-08-22 16:37:30 +1000
committerMartin Schwenke <martins@samba.org>2017-09-01 00:13:06 +0200
commite78d2cbff2e30dbea4a7d05bab8f8a5fedfebd79 (patch)
tree2bf580b62549cf814d16455847e4730d1050ebbb
parent0dce39e27857ba70c085b5ba7476abd9a710ac11 (diff)
downloadsamba-e78d2cbff2e30dbea4a7d05bab8f8a5fedfebd79.tar.gz
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rwxr-xr-xctdb/tests/eventscripts/10.interface.010.sh (renamed from ctdb/tests/eventscripts/10.interface.releaseip.010.sh)5
-rwxr-xr-xctdb/tests/eventscripts/10.interface.011.sh (renamed from ctdb/tests/eventscripts/10.interface.releaseip.011.sh)5
-rwxr-xr-xctdb/tests/eventscripts/10.interface.012.sh (renamed from ctdb/tests/eventscripts/10.interface.releaseip.012.sh)5
-rwxr-xr-xctdb/tests/eventscripts/10.interface.013.sh (renamed from ctdb/tests/eventscripts/10.interface.releaseip.013.sh)5
4 files changed, 12 insertions, 8 deletions
diff --git a/ctdb/tests/eventscripts/10.interface.releaseip.010.sh b/ctdb/tests/eventscripts/10.interface.010.sh
index 095e85c9b7c..f5fa0622582 100755
--- a/ctdb/tests/eventscripts/10.interface.releaseip.010.sh
+++ b/ctdb/tests/eventscripts/10.interface.010.sh
@@ -8,7 +8,8 @@ setup_ctdb
ctdb_get_1_public_address |
while read dev ip bits ; do
- ip addr add "${ip}/${bits}" dev "$dev"
+ ok_null
+ simple_test_event "takeip" $dev $ip $bits
count=10
setup_tcp_connections $count \
@@ -18,5 +19,5 @@ while read dev ip bits ; do
Killed ${count}/${count} TCP connections to released IP $ip
EOF
- simple_test $dev $ip $bits
+ simple_test_event "releaseip" $dev $ip $bits
done
diff --git a/ctdb/tests/eventscripts/10.interface.releaseip.011.sh b/ctdb/tests/eventscripts/10.interface.011.sh
index c129346db8e..1b85cead0c3 100755
--- a/ctdb/tests/eventscripts/10.interface.releaseip.011.sh
+++ b/ctdb/tests/eventscripts/10.interface.011.sh
@@ -8,7 +8,8 @@ setup_ctdb
ctdb_get_1_public_address |
while read dev ip bits ; do
- ip addr add "${ip}/${bits}" dev "$dev"
+ ok_null
+ simple_test_event "takeip" $dev $ip $bits
count=10
setup_tcp_connections $count \
@@ -23,5 +24,5 @@ Remaining connections:
10.0.0.3:445 10.254.254.1:43211
EOF
- simple_test $dev $ip $bits
+ simple_test_event "releaseip" $dev $ip $bits
done
diff --git a/ctdb/tests/eventscripts/10.interface.releaseip.012.sh b/ctdb/tests/eventscripts/10.interface.012.sh
index 53971fec88d..03c6c792504 100755
--- a/ctdb/tests/eventscripts/10.interface.releaseip.012.sh
+++ b/ctdb/tests/eventscripts/10.interface.012.sh
@@ -8,7 +8,8 @@ setup_ctdb
ctdb_get_1_public_address |
while read dev ip bits ; do
- ip addr add "${ip}/${bits}" dev "$dev"
+ ok_null
+ simple_test_event "takeip" $dev $ip $bits
count=10
@@ -26,5 +27,5 @@ Remaining connections:
10.0.0.3:445 10.254.254.3:43213
EOF
- simple_test $dev $ip $bits
+ simple_test_event "releaseip" $dev $ip $bits
done
diff --git a/ctdb/tests/eventscripts/10.interface.releaseip.013.sh b/ctdb/tests/eventscripts/10.interface.013.sh
index 91393d27ed9..eb4c2803ba0 100755
--- a/ctdb/tests/eventscripts/10.interface.releaseip.013.sh
+++ b/ctdb/tests/eventscripts/10.interface.013.sh
@@ -8,7 +8,8 @@ setup_ctdb
ctdb_get_1_public_address |
while read dev ip bits ; do
- ip addr add "${ip}/${bits}" dev "$dev"
+ ok_null
+ simple_test_event "takeip" $dev $ip $bits
setup_tcp_connections 0
@@ -31,5 +32,5 @@ Remaining connections:
10.0.0.3:445 10.254.254.10:43220
EOF
- simple_test $dev $ip $bits
+ simple_test_event "releaseip" $dev $ip $bits
done