From: Jason Ish Date: Tue, 9 Jan 2018 12:59:35 +0000 (-0600) Subject: dns test: move to test.yaml X-Git-Tag: suricata-6.0.4~551 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9595b0f66fea8b3ac5dbcbd1c85a41ab4b74c5f2;p=thirdparty%2Fsuricata-verify.git dns test: move to test.yaml --- diff --git a/tests/dns-udp-dig-a-www-suricata-ids-org/check.sh b/tests/dns-udp-dig-a-www-suricata-ids-org/check.sh deleted file mode 100755 index 56e6cbc35..000000000 --- a/tests/dns-udp-dig-a-www-suricata-ids-org/check.sh +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/sh - -. ../../util/functions.sh - -n=$(cat output/eve.json | jq -c 'select(.dns.type == "query")' | wc -l | xargs) -assert_eq 1 $n - -n=$(cat output/eve.json | jq -c 'select(.dns.type == "answer")' | wc -l | xargs) -assert_eq 3 $n - -n=$(cat output/eve.json | jq -c 'select(.dns.rrtype == "CNAME")' | wc -l | xargs) -assert_eq 1 $n - -n=$(cat output/eve.json | jq -c 'select(.dns.rrtype == "A")' | wc -l | xargs) -assert_eq 3 $n diff --git a/tests/dns-udp-dig-a-www-suricata-ids-org/test.yaml b/tests/dns-udp-dig-a-www-suricata-ids-org/test.yaml new file mode 100644 index 000000000..1285cbac6 --- /dev/null +++ b/tests/dns-udp-dig-a-www-suricata-ids-org/test.yaml @@ -0,0 +1,29 @@ +checks: + + - filter: + comment: dns query count + count: 1 + match: + event_type: dns + dns.type: query + + - filter: + comment: cname count + count: 1 + match: + event_type: dns + dns.rrtype: CNAME + + - filter: + comment: a rrtype count + count: 3 + match: + event_type: dns + dns.rrtype: A + + - filter: + comment: answer count + count: 3 + match: + event_type: dns + dns.type: answer