debug test
This commit is contained in:
parent
25561482c2
commit
0cb08e1c31
2 changed files with 20 additions and 4 deletions
|
@ -75,6 +75,9 @@ teardown() {
|
|||
|
||||
rune -0 ./instance-crowdsec start-pid
|
||||
PID="$output"
|
||||
|
||||
sleep .5
|
||||
|
||||
assert_file_exists "$log_old"
|
||||
assert_file_contains "$log_old" "Starting processing data"
|
||||
|
||||
|
|
|
@ -41,10 +41,23 @@ teardown() {
|
|||
echo -e "---\nfilename: ${tmpfile}\nlabels:\n type: syslog\n" >>"${ACQUIS_YAML}"
|
||||
|
||||
./instance-crowdsec start
|
||||
|
||||
sleep 0.2
|
||||
|
||||
fake_log >>"${tmpfile}"
|
||||
sleep 2
|
||||
|
||||
sleep 0.2
|
||||
|
||||
rm -f -- "${tmpfile}"
|
||||
rune -0 cscli decisions list -o json
|
||||
rune -0 jq -r '.[].decisions[0].value' <(output)
|
||||
assert_output '1.1.1.172'
|
||||
|
||||
found=0
|
||||
# this may take some time in CI
|
||||
for _ in $(seq 1 10); do
|
||||
if cscli decisions list -o json | jq -r '.[].decisions[0].value' | grep -q '1.1.1.172'; then
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
sleep 0.2
|
||||
done
|
||||
assert_equal 1 "${found}"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue