TMP: add a ctdb snapshot of current ctdb master (git://git.samba.org/ctdb.git) to...
[obnox/samba/samba-obnox.git] / ctdb / tests / eventscripts / simple / 10.interface.takeip.003.sh
1 #!/bin/sh
2
3 . "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
4
5 define_test "error - add same IP twice"
6
7 setup_ctdb
8
9 public_address=$(ctdb_get_1_public_address)
10
11 # This is a bit gross and contrived.  The method of quoting the error
12 # message so it makes it to required_result() is horrible.  Hopefully
13 # improvements will come.
14
15 err2="\
16 RTNETLINK answers: File exists
17 Failed to add 10.0.0.1/24 on dev dev123"
18
19 #EVENTSCRIPTS_TESTS_TRACE="sh -x"
20 iterate_test -- $public_address -- 2 "ok_null" \
21     2 'required_result 1 "$err2"'