diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-03-28 13:52:38 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2012-04-13 14:51:13 +1000 |
commit | f2a5fda861c1b523886e348b5e6ece554945f402 (patch) | |
tree | e29fbf9eabfed3b7e8040feea30986892e10131e | |
parent | db13fd893c909a9ad2f13671282ce4c286941d4f (diff) | |
download | samba-f2a5fda861c1b523886e348b5e6ece554945f402.tar.gz samba-f2a5fda861c1b523886e348b5e6ece554945f402.tar.xz samba-f2a5fda861c1b523886e348b5e6ece554945f402.zip |
tests: Check assigned IPs from ctdb output
This fixes the test ctdb_config_add_ip when running against local daemons.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit b81c2c8a2360001fe73f9fd9aa1ba32665fdb0bb)
-rwxr-xr-x | ctdb/tests/simple/16_ctdb_config_add_ip.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ctdb/tests/simple/16_ctdb_config_add_ip.sh b/ctdb/tests/simple/16_ctdb_config_add_ip.sh index 3207661f16..3c23ac1d9d 100755 --- a/ctdb/tests/simple/16_ctdb_config_add_ip.sh +++ b/ctdb/tests/simple/16_ctdb_config_add_ip.sh @@ -92,13 +92,13 @@ for i in $test_node_ips ; do # Get the interface details for $i, which our address is a # close relative of. This should never fail but it can't hurt # to be careful... - for k in $all_test_node_ips ; do - if [ "$i" = "${k%/*}" ] ; then - # Found one! - add_ip="${try}/${k#*/}" + try_command_on_node $test_node "ctdb ip -v -Y" + while IFS=":" read x ip pnn iface x ; do + if [ "$i" = "$ip" ]; then + add_ip="$try/32:$iface" break 3 fi - done + done <<<"$out" done done |