diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
commit | dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch) | |
tree | 66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/validation-run.sh | |
parent | Initial commit. (diff) | |
download | rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip |
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | tests/validation-run.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/validation-run.sh b/tests/validation-run.sh new file mode 100755 index 0000000..8ecad6b --- /dev/null +++ b/tests/validation-run.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# check if the configuration test run detects invalid config files. +# +# Part of the testbench for rsyslog. +# +# Copyright 2009-2018 Rainer Gerhards and Adiscon GmbH. +# +# This file is part of rsyslog. +# Released under ASL 2.0 +echo \[validation-run.sh\]: testing configuration validation +echo "testing a failed configuration verification run" +../tools/rsyslogd -u2 -N1 -f$srcdir/testsuites/invalid.conf -M../runtime/.libs:../.libs +if [ $? -ne 1 ]; then + echo "after test 1: return code ne 1" + exit 1 +fi +echo testing a valid config verification run +../tools/rsyslogd -u2 -N1 -f$srcdir/testsuites/valid.conf -M../runtime/.libs:../.libs +if [ $? -ne 0 ]; then + echo "after test 2: return code ne 0" + exit 1 +fi +echo testing empty config file +../tools/rsyslogd -u2 -N1 -f/dev/null -M../runtime/.libs:../.libs +if [ $? -ne 1 ]; then + echo "after test 3: return code ne 1" + exit 1 +fi +echo SUCCESS: validation run tests |