forked from weka-io/samba
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ctdb-tests: Populate per-node known IPs inline
At the moment this is done as a post-processing step for any nodes that have no known IPs. However, this doesn't allow testing of scenarios where there no known IPs on one or more nodes. Add relevant tests. Signed-off-by: Martin Schwenke <[email protected]> Reviewed-by: Amitay Isaacs <[email protected]>
- Loading branch information
1 parent
5bb6ec6
commit 58296e3
Showing
3 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
. "${TEST_SCRIPTS_DIR}/unit.sh" | ||
|
||
define_test "3 nodes, 1 without IP addresses" | ||
|
||
export CTDB_TEST_LOGLEVEL=ERR | ||
|
||
required_result <<EOF | ||
192.168.140.4 0 | ||
192.168.140.3 1 | ||
192.168.140.2 0 | ||
192.168.140.1 1 | ||
EOF | ||
|
||
simple_test 0,0,0 <<EOF | ||
192.168.140.1 -1 0,1 | ||
192.168.140.2 -1 0,1 | ||
192.168.140.3 -1 0,1 | ||
192.168.140.4 -1 0,1 | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
. "${TEST_SCRIPTS_DIR}/unit.sh" | ||
|
||
define_test "3 nodes, all ok, IPs defined on 2, IPs all unassigned" | ||
|
||
setup_ctdbd <<EOF | ||
NODEMAP | ||
0 192.168.20.41 0x0 CURRENT RECMASTER | ||
1 192.168.20.42 0x0 | ||
2 192.168.20.43 0x0 | ||
IFACES | ||
:Name:LinkStatus:References: | ||
:eth2:1:2: | ||
:eth1:1:4: | ||
PUBLICIPS | ||
10.0.0.31 -1 0,2 | ||
10.0.0.32 -1 0,2 | ||
10.0.0.33 -1 0,2 | ||
10.0.0.34 -1 0,2 | ||
EOF | ||
|
||
ok_null | ||
test_takeover_helper | ||
|
||
required_result 0 <<EOF | ||
Public IPs on ALL nodes | ||
10.0.0.31 0 | ||
10.0.0.32 2 | ||
10.0.0.33 2 | ||
10.0.0.34 0 | ||
EOF | ||
test_ctdb_ip_all |