Die if --log, --pid, or --dest aren't accessible. Also die if po dir isn't accessible.

This commit is contained in:
Daniel Nichter
2012-01-17 13:12:08 -07:00
parent b2bac5c765
commit 6e2b670af6
5 changed files with 76 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
TESTS=7
TESTS=9
TMPDIR="$TEST_TMPDIR"
local file="$TMPDIR/pid-file"
@@ -60,6 +60,22 @@ is \
rm $file
rm $TMPDIR/output
# ###########################################################################
# Die if pid file can't be created.
# ###########################################################################
(
make_pid_file "/root/pid" $$ >$TMPDIR/output 2>&1
)
is \
"$?" \
"1" \
"Exit 1 if PID file can't be created"
cmd_ok \
"grep -q 'Cannot create or write PID file /root/pid' $TMPDIR/output" \
"Error that PID file can't be created"
# ###########################################################################
# Done.
# ###########################################################################