1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/ctdb/tests/INTEGRATION/simple/cluster.001.stop_leader_yield.sh
Martin Schwenke 01313ea243 ctdb-tests: Improve test coverage for leader role yield and elections
Rename test, clean up node selection.  Duplicate for for banning and
removing leader capability cases.  Repeat all 3 tests without cluster
lock.

All of the standard election triggers are now tested, with and without
cluster lock.  Due to test cluster configuration limitations, the
tests without cluster lock are skipped on a real cluster.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-01-17 10:21:33 +00:00

27 lines
537 B
Bash
Executable File

#!/usr/bin/env bash
# Verify that 'ctdb stop' causes a node to yield the leader role
. "${TEST_SCRIPTS_DIR}/integration.bash"
set -e
ctdb_test_init
# This is the node used to execute commands
select_test_node
echo
# test_node set by select_test_node()
# shellcheck disable=SC2154
leader_get "$test_node"
# leader set by leader_get()
# shellcheck disable=SC2154
echo "Stopping leader ${leader}..."
ctdb_onnode "$test_node" stop -n "$leader"
wait_until_node_has_status "$leader" stopped
wait_until_leader_has_changed "$test_node"