mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
ctdb-tests: Remove remaining uses of iterate_test()
They are contrived and hard to read. Better to just enumerate the few sub-tests in these testcases. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
committed by
Amitay Isaacs
parent
0bcb4dfe61
commit
a496c8bca6
@ -9,7 +9,13 @@ setup_ctdb
|
||||
iface="dev999"
|
||||
export CTDB_PUBLIC_INTERFACE="$iface"
|
||||
|
||||
#EVENTSCRIPTS_TESTS_TRACE="sh -x"
|
||||
iterate_test 3 "ok_null" \
|
||||
1 'ethtool_interfaces_down "$iface" ; required_result 1 "ERROR: No link on the public network interface $iface"' \
|
||||
2 'ethtool_interfaces_up "$iface"'
|
||||
ethtool_interfaces_down "$iface"
|
||||
required_result 1 "ERROR: No link on the public network interface $iface"
|
||||
simple_test
|
||||
|
||||
ethtool_interfaces_up "$iface"
|
||||
ok_null
|
||||
simple_test
|
||||
|
||||
ok_null
|
||||
simple_test
|
||||
|
@ -12,14 +12,11 @@ t="${public_address#* }"
|
||||
ip="${t% *}"
|
||||
bits="${t#* }"
|
||||
|
||||
# This is a bit gross and contrived. The method of quoting the error
|
||||
# message so it makes it to required_result() is horrible. Hopefully
|
||||
# improvements will come.
|
||||
ok_null
|
||||
simple_test $public_address
|
||||
|
||||
err2="\
|
||||
required_result 1 <<EOF
|
||||
RTNETLINK answers: File exists
|
||||
Failed to add $ip/$bits on dev $dev"
|
||||
|
||||
#EVENTSCRIPTS_TESTS_TRACE="sh -x"
|
||||
iterate_test -- $public_address -- 2 "ok_null" \
|
||||
2 'required_result 1 "$err2"'
|
||||
Failed to add $ip/$bits on dev $dev
|
||||
EOF
|
||||
simple_test $public_address
|
||||
|
Reference in New Issue
Block a user