]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add datarep parsing test 225/head
authorVictor Julien <victor@inliniac.net>
Mon, 27 Apr 2020 06:39:22 +0000 (08:39 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 27 Apr 2020 06:45:41 +0000 (08:45 +0200)
tests/datarep-03-bad-reputation/datarep.rules [new file with mode: 0644]
tests/datarep-03-bad-reputation/dns_md5.rep [new file with mode: 0644]
tests/datarep-03-bad-reputation/test.yaml [new file with mode: 0644]

diff --git a/tests/datarep-03-bad-reputation/datarep.rules b/tests/datarep-03-bad-reputation/datarep.rules
new file mode 100644 (file)
index 0000000..4f20cfc
--- /dev/null
@@ -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 (file)
index 0000000..c93bd7c
--- /dev/null
@@ -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 (file)
index 0000000..a9ac4b7
--- /dev/null
@@ -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