1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00
samba-mirror/ctdb/tests/eventscripts/01.reclock.init.003.sh
Martin Schwenke 5701f4aeca ctdb-tests: Add some 01.reclock.script init event tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-07-26 03:34:17 +00:00

31 lines
586 B
Bash
Executable File

#!/bin/sh
. "${TEST_SCRIPTS_DIR}/unit.sh"
define_test "set to default lock file, directory is created"
setup
dir=$(dirname "$CTDB_RECOVERY_LOCK")
# Ensure directory doesn't exist before
required_result 1 ""
unit_test test -d "$dir"
# FreeBSD mkdir -v just prints the filename. Filter the rest of the
# message from other platforms, including any exotic quotes around the
# filename.
result_filter ()
{
sed \
-e 's|^\(mkdir: created directory \)[[:punct:]]||' \
-e 's|[[:punct:]]$||'
}
ok "$dir"
simple_test
# Ensure directory exists after
ok_null
unit_test test -d "$dir"