File: start-cluster-broargs.test

package info (click to toggle)
broctl 1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 2,220 kB
  • sloc: python: 4,931; sh: 1,188; makefile: 70; awk: 24
file content (24 lines) | stat: -rw-r--r-- 666 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Test that the start command starts a cluster and passes additional
# arguments to Bro as specified in the broargs broctl option.
#
# @TEST-EXEC: bash %INPUT
# @TEST-EXEC: TEST_DIFF_CANONIFIER="$SCRIPTS/diff-remove-timestamps-dd-mmm-hh-mm-ss | $SCRIPTS/diff-remove-abspath" btest-diff debug.log

. broctl-test-setup

while read line; do installcfgfile "$line"; done << EOF
etc/broctl.cfg__debug
etc/node.cfg__cluster
bin/bro__test
EOF

echo "broargs=mytest myscript" >> $BROCTL_INSTALL_PREFIX/etc/broctl.cfg

broctl install
broctl start

# extract the relevant lines from debug.log
grep CLUSTER_NODE $BROCTL_INSTALL_PREFIX/spool/debug.log > debug.log

broctl stop