Code

t/integration/simple_config.sh: Test some more invalid settings.
authorSebastian Harl <sh@tokkee.org>
Sat, 19 Jul 2014 12:51:58 +0000 (14:51 +0200)
committerSebastian Harl <sh@tokkee.org>
Sat, 19 Jul 2014 12:51:58 +0000 (14:51 +0200)
t/integration/simple_config.sh

index 175416d59b5e08a9fff31aa0e85d59a2e446a6d6..b4c7253861917a46ece718b6cd731b5ed9832a24 100755 (executable)
@@ -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 <<EOF > "$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 <<EOF > "$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 <<EOF > "$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 <<EOF > "$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 <<EOF > "$SYSDBD_CONF"
 Listen "$SOCKET_FILE"
 EOF