This shows that a warning is generated whenever an IP address is
removed using an altname.
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
--- /dev/null
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "Add/release 1 IP, interface is altname"
+
+setup
+
+ctdb_get_1_public_address |
+ while read -r dev ip bits; do
+ altname="alt${dev}"
+ ip link property add dev "$dev" altname "$altname"
+
+ ok_null
+ simple_test_event "takeip" "$altname" "$ip" "$bits"
+
+ ok <<EOF
+WARNING: Public IP ${ip} hosted on interface ${dev} but VNN says ${altname}
+EOF
+ simple_test_event "releaseip" "$altname" "$ip" "$bits"
+ done