]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
test: test for empty dns/eve formats 1448/head
authorJason Ish <jason.ish@oisf.net>
Fri, 27 Oct 2023 18:50:25 +0000 (12:50 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 30 Oct 2023 18:33:28 +0000 (19:33 +0100)
Test that when dns/eve "formats" is empty, it uses the default of all.

Bug: #6420

tests/dns/dns-eve-empty-format/README.md [new file with mode: 0644]
tests/dns/dns-eve-empty-format/input.pcap [new file with mode: 0644]
tests/dns/dns-eve-empty-format/suricata.yaml [new file with mode: 0644]
tests/dns/dns-eve-empty-format/test.yaml [new file with mode: 0644]

diff --git a/tests/dns/dns-eve-empty-format/README.md b/tests/dns/dns-eve-empty-format/README.md
new file mode 100644 (file)
index 0000000..e82386f
--- /dev/null
@@ -0,0 +1,5 @@
+Test that emtpy EVE/DNS "formats" configuration results in the default
+of both formats.
+
+https://redmine.openinfosecfoundation.org/issues/6420
+
diff --git a/tests/dns/dns-eve-empty-format/input.pcap b/tests/dns/dns-eve-empty-format/input.pcap
new file mode 100644 (file)
index 0000000..5c9ee35
Binary files /dev/null and b/tests/dns/dns-eve-empty-format/input.pcap differ
diff --git a/tests/dns/dns-eve-empty-format/suricata.yaml b/tests/dns/dns-eve-empty-format/suricata.yaml
new file mode 100644 (file)
index 0000000..47b4352
--- /dev/null
@@ -0,0 +1,11 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      filetype: regular
+      filename: eve.json
+      types:
+        - dns:
+            formats:
diff --git a/tests/dns/dns-eve-empty-format/test.yaml b/tests/dns/dns-eve-empty-format/test.yaml
new file mode 100644 (file)
index 0000000..0be5eb8
--- /dev/null
@@ -0,0 +1,7 @@
+checks:
+  - filter:
+      count: 1
+      match:
+        pcap_cnt: 8
+        dns.answers[0].rrtype: A
+        dns.grouped.A[0]: "52.85.112.21"