mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-tests: Add tests for "ctdb reloadips" and "ctdb recover"
Although much of the test infrastructure in recent commits is actually targeted for "reloadnodes", it is worthwhile adding some tests for "reloadips" and "recover". This allows most of the test infrastructure to be tried out against known good code. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Mon Mar 16 09:18:55 CET 2015 on sn-devel-104
This commit is contained in:
parent
a3f39ae7d7
commit
8f312aef84
20
ctdb/tests/tool/stubby.recover.001.sh
Executable file
20
ctdb/tests/tool/stubby.recover.001.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "Just a recovery"
|
||||
|
||||
ok_null
|
||||
|
||||
simple_test <<EOF
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x0 CURRENT
|
||||
1 192.168.20.42 0x0 RECMASTER
|
||||
2 192.168.20.43 0x0
|
||||
|
||||
VNNMAP
|
||||
654321
|
||||
0
|
||||
1
|
||||
2
|
||||
EOF
|
17
ctdb/tests/tool/stubby.reloadips.001.sh
Executable file
17
ctdb/tests/tool/stubby.reloadips.001.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "Single node reload"
|
||||
|
||||
required_result 0 <<EOF
|
||||
Fake reload public IPs on node 0
|
||||
Fake takeover run on recovery master 1
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x0 CURRENT
|
||||
1 192.168.20.42 0x0 RECMASTER
|
||||
2 192.168.20.43 0x0
|
||||
EOF
|
25
ctdb/tests/tool/stubby.reloadips.002.sh
Executable file
25
ctdb/tests/tool/stubby.reloadips.002.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "Single node reload, more debug"
|
||||
|
||||
CTDB_DEBUGLEVEL=4
|
||||
|
||||
required_result 0 <<EOF
|
||||
Disable takeover runs reply received from node 0
|
||||
Disable takeover runs reply received from node 1
|
||||
Disable takeover runs reply received from node 2
|
||||
Fake reload public IPs on node 0
|
||||
Enable takeover runs reply received from node 0
|
||||
Enable takeover runs reply received from node 1
|
||||
Enable takeover runs reply received from node 2
|
||||
Fake takeover run on recovery master 1
|
||||
EOF
|
||||
|
||||
simple_test <<EOF
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x0 CURRENT
|
||||
1 192.168.20.42 0x0 RECMASTER
|
||||
2 192.168.20.43 0x0
|
||||
EOF
|
19
ctdb/tests/tool/stubby.reloadips.003.sh
Executable file
19
ctdb/tests/tool/stubby.reloadips.003.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
||||
|
||||
define_test "All node reload"
|
||||
|
||||
required_result 0 <<EOF
|
||||
Fake reload public IPs on node 0
|
||||
Fake reload public IPs on node 1
|
||||
Fake reload public IPs on node 2
|
||||
Fake takeover run on recovery master 1
|
||||
EOF
|
||||
|
||||
simple_test all <<EOF
|
||||
NODEMAP
|
||||
0 192.168.20.41 0x0 CURRENT
|
||||
1 192.168.20.42 0x0 RECMASTER
|
||||
2 192.168.20.43 0x0
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user