1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

Tests: update tests to work with previous commit.

Issues:

* 10.monitor no longer prints a message when there is no
  public_addresses file.

* Extra bonding test added to check workaround for IEEE 802.3ad
  Dynamic link aggregation bonding mode bug.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 01c941ab4c764c5aac0d7c0f90fca89775956d41)
This commit is contained in:
Martin Schwenke 2011-07-05 17:12:21 +10:00
parent 506be3cb26
commit 2c9c77f6dc
5 changed files with 25 additions and 3 deletions

View File

@ -147,10 +147,17 @@ setup_bond ()
_iface="$1"
_slave="${2:-${_iface}_sl_0}"
_mii_s="${3:-up}"
_mii_subs="${4:-${_mii_s:-up}}"
echo "Setting $_iface to be a bond with active slave $_slave and MII status $_mii_s"
cat >"${FAKE_PROC_NET_BONDING}/$_iface" <<EOF
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Currently Active Slave: $_slave
# Status of the bond
MII Status: $_mii_s
# Status of 1st pretend adapter
MII Status: $_mii_subs
# Status of 2nd pretend adapter
MII Status: $_mii_subs
EOF
}

View File

@ -8,6 +8,6 @@ setup_ctdb
export CTDB_PUBLIC_ADDRESSES="$CTDB_ETC/does/not/exist"
ok "No public addresses file found. Nothing to do for 10.interfaces"
ok_null
simple_test

View File

@ -8,6 +8,6 @@ setup_ctdb
export CTDB_PUBLIC_ADDRESSES="$CTDB_ETC/does/not/exist"
ok "No public addresses file found. Nothing to do for 10.interfaces"
ok_null
simple_test

View File

@ -0,0 +1,15 @@
#!/bin/sh
. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
define_test "1 bond, active slaves, link down"
setup_ctdb
iface=$(ctdb_get_1_interface)
setup_bond $iface "" "up" "down"
required_result 1 "ERROR: No active slaves for 802.ad bond device $iface"
simple_test

View File

@ -8,6 +8,6 @@ setup_ctdb
export CTDB_PUBLIC_ADDRESSES="$CTDB_ETC/does/not/exist"
ok "No public addresses file found. Nothing to do for 10.interfaces"
ok_null
simple_test