diff options
author | Martin Schwenke <martin@meltin.net> | 2015-07-08 22:22:09 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2015-07-14 09:57:17 +0200 |
commit | 8ed0cacaf4aa9fc63b8c8d610a6164c5d01e473a (patch) | |
tree | 5612e55fa697d68d734ba7d3d05d70b86a28c2fb /ctdb/tests | |
parent | 8e41cb1e4e7b4a7d92628771260649ded4432772 (diff) | |
download | samba-8ed0cacaf4aa9fc63b8c8d610a6164c5d01e473a.tar.gz |
ctdb-tests: Add some 10.interfaces VLAN tests
One without a bond, one with a bond.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests')
-rwxr-xr-x | ctdb/tests/eventscripts/10.interface.monitor.017.sh | 20 | ||||
-rwxr-xr-x | ctdb/tests/eventscripts/10.interface.monitor.018.sh | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/ctdb/tests/eventscripts/10.interface.monitor.017.sh b/ctdb/tests/eventscripts/10.interface.monitor.017.sh new file mode 100755 index 00000000000..6e30040e2c7 --- /dev/null +++ b/ctdb/tests/eventscripts/10.interface.monitor.017.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "1 VLAN, link down" + +setup_ctdb + +iface=$(ctdb_get_1_interface) + +ethtool_interfaces_down "$iface" + +# This just exercises the VLAN checking code, which will allow us to +# determine that real0 is not a bond. +realiface="real0" +ip link add link "$realiface" name "$iface" type vlan id 11 +ip link set "${iface}@${realiface}" up + +required_result 1 "ERROR: No link on the public network interface ${iface}" +simple_test diff --git a/ctdb/tests/eventscripts/10.interface.monitor.018.sh b/ctdb/tests/eventscripts/10.interface.monitor.018.sh new file mode 100755 index 00000000000..aac23b88128 --- /dev/null +++ b/ctdb/tests/eventscripts/10.interface.monitor.018.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "VLAN on bond, active slaves, link down" + +setup_ctdb + +iface=$(ctdb_get_1_interface) + +bond="bond0" + +setup_bond "$bond" "" "down" + +ip link add link "$bond" name "$iface" type vlan id 11 +ip link set "${iface}@${bond}" up + +required_result 1 "ERROR: public network interface ${bond} is down" + +simple_test |