ci/live: test for sid 1 existence, not in last position

pull/15850/head
Philippe Antoine 2 years ago
parent 8455efd9ac
commit 70157b1e15

@ -70,8 +70,8 @@ if [ $STATSCHECK = false ]; then
echo "ERROR no packets captured"
RES=1
fi
SID1CHECK=$(jq -c 'select(.event_type == "alert")' ./eve.json | tail -n1 | jq '.alert.signature_id == 1')
if [ $SID1CHECK = false ]; then
SID1CHECK=$(jq -c 'select(.alert.signature_id == 1)' ./eve.json | wc -l)
if [ $SID1CHECK -eq 0 ]; then
echo "ERROR no alerts for sid 1"
RES=1
fi

@ -61,8 +61,8 @@ if [ $STATSCHECK = false ]; then
echo "ERROR no packets captured"
RES=1
fi
SID1CHECK=$(jq -c 'select(.event_type == "alert")' ./eve.json | tail -n1 | jq '.alert.signature_id == 1')
if [ $SID1CHECK = false ]; then
SID1CHECK=$(jq -c 'select(.alert.signature_id == 1)' ./eve.json | wc -l)
if [ $SID1CHECK -eq 0 ]; then
echo "ERROR no alerts for sid 1"
RES=1
fi

Loading…
Cancel
Save