summaryrefslogtreecommitdiff
path: root/tests/elasticsearch-bulk-errorfile-populated.sh
blob: 169fa1c4930e09234a17973def063f7d63b03661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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