summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/eventscripts/00.ctdb.init.023.sh
blob: 9b97e8213138251f427734c20e28c7df91e7f7de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

. "${TEST_SCRIPTS_DIR}/unit.sh"

define_test "Check public IP dropping, all assigned"

setup_ctdb

nl="
"
ctdb_get_my_public_addresses | {
    out=""
    while read dev ip bits ; do
	ip addr add "${ip}/${bits}" dev "$dev"

	msg="Removing public address ${ip}/${bits} from device ${dev}"
	out="${out}${out:+${nl}}${msg}"
    done

    ok "$out"

    simple_test
}