1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ctdb-tests: 01.reclock event script setup modularisation

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-02-08 06:24:01 +11:00 committed by Amitay Isaacs
parent db5c604152
commit 7cddc88d03
6 changed files with 9 additions and 6 deletions

View File

@ -4,6 +4,8 @@
define_test "unset, check no-op"
setup
CTDB_RECOVERY_LOCK=""
ok_null

View File

@ -4,6 +4,8 @@
define_test "set to helper, check no-op"
setup
CTDB_RECOVERY_LOCK="!/some/recover/lock/helper foo"
ok_null

View File

@ -4,7 +4,7 @@
define_test "set, exists"
setup_reclock
setup
ok_null
simple_test

View File

@ -4,7 +4,7 @@
define_test "set, doesn't exist, 4 times"
setup_reclock
setup
rm -f "$CTDB_RECOVERY_LOCK"
ok_null

View File

@ -4,7 +4,7 @@
define_test "set, doesn't exist, 4 times"
setup_reclock
setup
rm -f "$CTDB_RECOVERY_LOCK"
ok_null

View File

@ -7,10 +7,9 @@ cleanup_reclock ()
done
}
setup_reclock ()
setup ()
{
CTDB_RECOVERY_LOCK=$(mktemp --tmpdir="$EVENTSCRIPTS_TESTS_VAR_DIR")
export CTDB_RECOVERY_LOCK
export CTDB_RECOVERY_LOCK="${EVENTSCRIPTS_TESTS_VAR_DIR}/rec.lock"
test_cleanup cleanup_reclock
}