summaryrefslogtreecommitdiff
path: root/tests/elasticsearch-bulk-errorfile-populated.sh
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-09-26 23:40:38 +0200
committerMichael Biebl <biebl@debian.org>2014-09-26 23:40:38 +0200
commit7bfd178d59a2c706d46092d745b54c61403cb44a (patch)
treefe5db3a861d09953408ad79a21318eda3afed7de /tests/elasticsearch-bulk-errorfile-populated.sh
parent1dfcd909d90f6fad4a612b6fd998d7473a9da399 (diff)
downloadrsyslog-7bfd178d59a2c706d46092d745b54c61403cb44a.tar.gz
Imported Upstream version 8.4.1upstream/8.4.1upstream
Diffstat (limited to 'tests/elasticsearch-bulk-errorfile-populated.sh')
-rwxr-xr-xtests/elasticsearch-bulk-errorfile-populated.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/elasticsearch-bulk-errorfile-populated.sh b/tests/elasticsearch-bulk-errorfile-populated.sh
new file mode 100755
index 0000000..169fa1c
--- /dev/null
+++ b/tests/elasticsearch-bulk-errorfile-populated.sh
@@ -0,0 +1,26 @@
+# This file is part of the rsyslog project, released under ASL 2.0
+echo ===============================================================================
+echo \[elasticsearch-bulk-errorfile-populated\]: basic test for elasticsearch functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh es-init
+curl -XPUT localhost:9200/rsyslog_testbench/ -d '{
+ "mappings": {
+ "test-type": {
+ "properties": {
+ "msgnum": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+}'
+source $srcdir/diag.sh startup elasticsearch-bulk-errorfile-populated.conf
+source $srcdir/diag.sh injectmsg 0 1000
+source $srcdir/diag.sh shutdown-when-empty
+source $srcdir/diag.sh wait-shutdown
+if [ ! -f rsyslog.errorfile ]
+then
+ echo "error: error file does not exist!"
+ exit 1
+fi
+source $srcdir/diag.sh exit