From 02293b5c98513f52cc2aae5cad81a0399fe32060 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 19 Jul 2014 14:51:58 +0200 Subject: [PATCH] t/integration/simple_config.sh: Test some more invalid settings. --- t/integration/simple_config.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) 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 -- 2.30.2