1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00
samba-mirror/ctdb/tests/tool/stubby.listnodes.002.sh
Martin Schwenke 79d2800004 ctdb-tests: Add "ctdb listnodes" and "ctdb xpnn" stub tests
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>
2014-03-23 04:20:14 +01:00

21 lines
236 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "missing nodes file"
setup_nodes <<EOF
192.168.20.41
192.168.20.42
192.168.20.43
EOF
required_result 0 <<EOF
192.168.20.41
192.168.20.42
192.168.20.43
EOF
simple_test <<EOF
EOF