ctdb-server: Use find_public_ip_vnn() in a couple of extra places
[samba4-gss.git] / ctdb / tests / UNIT / tool / ctdb.setifacelink.001.sh
blob53104cfc1b1b340dc0829bcf1191211904b8823f
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test "toggle state of 2 interfaces"
7 setup_ctdbd <<EOF
8 NODEMAP
9 0 192.168.20.41 0x0 CURRENT RECMASTER
10 1 192.168.20.42 0x0
11 2 192.168.20.43 0x0
13 IFACES
14 :Name:LinkStatus:References:
15 :eth2:1:2:
16 :eth1:0:4:
17 EOF
19 # eth1: down -> down
21 ok_null
22 simple_test eth1 down
24 ok <<EOF
25 Interfaces on node 0
26 name:eth2 link:up references:2
27 name:eth1 link:down references:4
28 EOF
29 simple_test_other ifaces
31 # eth1: down -> up
33 ok_null
34 simple_test eth1 up
36 ok <<EOF
37 Interfaces on node 0
38 name:eth2 link:up references:2
39 name:eth1 link:up references:4
40 EOF
41 simple_test_other ifaces
43 # eth1: up -> down
44 ok_null
45 simple_test eth1 down
47 ok <<EOF
48 Interfaces on node 0
49 name:eth2 link:up references:2
50 name:eth1 link:down references:4
51 EOF
52 simple_test_other ifaces
54 # eth2: up -> down
56 ok_null
57 simple_test eth2 down
59 ok <<EOF
60 Interfaces on node 0
61 name:eth2 link:down references:2
62 name:eth1 link:down references:4
63 EOF
64 simple_test_other ifaces
66 # eth1: down -> up
68 ok_null
69 simple_test eth1 up
71 ok <<EOF
72 Interfaces on node 0
73 name:eth2 link:down references:2
74 name:eth1 link:up references:4
75 EOF
76 simple_test_other ifaces