mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
e9abc9c070
Complicated argument handling was introduced to deal with multiple services per eventscript. This was a failure and we split 50.samba. This simplifies several functions to use global $service_name unconditionally instead of having an optional argument. $service_name is no automatically longer set in the functions file. This means it needs to be explicitly set in 13.per_ip_routing because this script uses ctdb_service_check_reconfigure(). Eventscript unit test infrastructure needs to set $service_name during fake service setup, and policy routing tests need to be updated accordingly. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 27aab8783898a50da8c4bc887b512d8f0c0d842c)
25 lines
592 B
Bash
Executable File
25 lines
592 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
|
|
|
define_test "1 IP configured, ipreallocated, less routes, reconfigure"
|
|
|
|
setup_ctdb
|
|
setup_ctdb_policy_routing
|
|
|
|
create_policy_routing_config 1 default
|
|
|
|
# no takeip, but ipreallocated should add any missing routes
|
|
ok_null
|
|
simple_test_event "ipreallocated"
|
|
|
|
# rewrite the configuration to take out the default routes, as per the
|
|
# above change to $args
|
|
create_policy_routing_config 1
|
|
|
|
# reconfigure should update routes even though rules are unchanged
|
|
ok "Reconfiguring service \""${service_name}\""..."
|
|
simple_test_event "reconfigure"
|
|
|
|
check_routes 1
|