From: Victor Julien Date: Mon, 27 Apr 2020 06:39:22 +0000 (+0200) Subject: tests: add datarep parsing test X-Git-Tag: suricata-6.0.4~301 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F225%2Fhead;p=thirdparty%2Fsuricata-verify.git tests: add datarep parsing test --- diff --git a/tests/datarep-03-bad-reputation/datarep.rules b/tests/datarep-03-bad-reputation/datarep.rules new file mode 100644 index 000000000..4f20cfc65 --- /dev/null +++ b/tests/datarep-03-bad-reputation/datarep.rules @@ -0,0 +1 @@ +alert dns any any -> any any (dns.query; to_md5; datarep:dns_md5, >, 200, load dns_md5.rep, type md5; sid:1;) diff --git a/tests/datarep-03-bad-reputation/dns_md5.rep b/tests/datarep-03-bad-reputation/dns_md5.rep new file mode 100644 index 000000000..c93bd7c76 --- /dev/null +++ b/tests/datarep-03-bad-reputation/dns_md5.rep @@ -0,0 +1,2 @@ +1d5920f4b44b27a802bd77c4f0536f5a,65536 +5ababd603b22780302dd8d83498e5172,111.0 diff --git a/tests/datarep-03-bad-reputation/test.yaml b/tests/datarep-03-bad-reputation/test.yaml new file mode 100644 index 000000000..a9ac4b749 --- /dev/null +++ b/tests/datarep-03-bad-reputation/test.yaml @@ -0,0 +1,18 @@ +requires: + features: + - HAVE_NSS + files: + - src/datasets.c + + # No pcap required. + pcap: false + +exit-code: 1 + +args: + - --engine-analysis + +checks: + - shell: + args: grep "SC_ERR_INVALID_NUMERIC_VALUE" suricata.log | wc -l | xargs + expect: 1