From: Sebastian Harl Date: Sat, 19 Jul 2014 12:51:58 +0000 (+0200) Subject: t/integration/simple_config.sh: Test some more invalid settings. X-Git-Tag: sysdb-0.3.0~42 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=02293b5c98513f52cc2aae5cad81a0399fe32060;p=sysdb.git t/integration/simple_config.sh: Test some more invalid settings. --- diff --git a/t/integration/simple_config.sh b/t/integration/simple_config.sh index 175416d..b4c7253 100755 --- a/t/integration/simple_config.sh +++ b/t/integration/simple_config.sh @@ -33,21 +33,47 @@ set -e source "$( dirname "$0" )/test_lib.sh" +# Very basics ;-) run_sysdb -V run_sysdb -h run_sysdbd -V run_sysdbd -h +# Simple invalid configuration examples. cat < "$SYSDBD_CONF" -Listen "invalid://address" +Invalid "option" EOF +if run_sysdbd_foreground -D -C "$SYSDBD_CONF"; then + echo 'SysDBd accepted invalid option; expected: failure' >&2 + exit 1 +fi +cat < "$SYSDBD_CONF" +Listen "invalid://address" +EOF if run_sysdbd_foreground -D -C "$SYSDBD_CONF"; then echo 'SysDBd accepted invalid listen address; expected: failure' >&2 exit 1 fi +cat < "$SYSDBD_CONF" +Interval "foo" +EOF +if run_sysdbd_foreground -D -C "$SYSDBD_CONF"; then + echo 'SysDBd accepted invalid interval; expected: failure' >&2 + exit 1 +fi + +cat < "$SYSDBD_CONF" +Interval -3.0 +EOF +if run_sysdbd_foreground -D -C "$SYSDBD_CONF"; then + echo 'SysDBd accepted invalid interval; expected: failure' >&2 + exit 1 +fi + +# Simple configuration examples. cat < "$SYSDBD_CONF" Listen "$SOCKET_FILE" EOF