rsyslog/tests/es-basic-errfile-popul.sh
Andre Lorbach df3d4a3922 test-suite: Added !#/bin/bash into all test scripts.
Most of the tests will not work in other default shells like
on Freebsd or Solaris. So we make /bin/bash default now.
2015-07-30 15:38:17 +00:00

28 lines
754 B
Bash
Executable File

#!/bin/bash
# This file is part of the rsyslog project, released under ASL 2.0
echo ===============================================================================
echo \[es-basic-errfile-popul\]: basic test for elasticsearch functionality
. $srcdir/diag.sh init
. $srcdir/diag.sh es-init
curl -XPUT localhost:9200/rsyslog_testbench/ -d '{
"mappings": {
"test-type": {
"properties": {
"msgnum": {
"type": "integer"
}
}
}
}
}'
. $srcdir/diag.sh startup es-basic-errfile-popul.conf
. $srcdir/diag.sh injectmsg 0 1000
. $srcdir/diag.sh shutdown-when-empty
. $srcdir/diag.sh wait-shutdown
if [ ! -f rsyslog.errorfile ]
then
echo "error: error file does not exist!"
exit 1
fi
. $srcdir/diag.sh exit