mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
79d2800004
Tests for xpnn need to implement a stub for ctdb_sys_have_ip(). The cheapest way of doing this is to read a fake nodemap using the existing code and check if the IP of the "current" node is the one being asked about. However, the fake state initialisation isn't currently available to without_daemon commands because it is meant to represent daemon state. However, it can be made available by moving the relevant code into a new stub for tevent_context_init(). The stub still needs to initialise a tevent context - this can be done by calling a lower level function. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
21 lines
299 B
Bash
Executable File
21 lines
299 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
|
|
|
define_test "3 nodes, current is 2"
|
|
|
|
setup_nodes <<EOF
|
|
192.168.20.41
|
|
192.168.20.42
|
|
192.168.20.43
|
|
EOF
|
|
|
|
required_result 0 "PNN:2"
|
|
|
|
simple_test <<EOF
|
|
NODEMAP
|
|
0 192.168.20.41 0x0
|
|
1 192.168.20.42 0x0
|
|
2 192.168.20.43 0x0 CURRENT
|
|
EOF
|