]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add test for issue 4751
authorHaleema Khan <hsadia538@gmail.com>
Fri, 21 Oct 2022 21:06:02 +0000 (02:06 +0500)
committerShivani Bhardwaj <shivani@oisf.net>
Fri, 28 Oct 2022 11:55:28 +0000 (17:25 +0530)
Ticket: #4751

tests/dns-eve-log-https-only/README.md [new file with mode: 0644]
tests/dns-eve-log-https-only/suricata.yaml [new file with mode: 0644]
tests/dns-eve-log-https-only/test.pcap [new file with mode: 0644]
tests/dns-eve-log-https-only/test.yaml [new file with mode: 0644]

diff --git a/tests/dns-eve-log-https-only/README.md b/tests/dns-eve-log-https-only/README.md
new file mode 100644 (file)
index 0000000..1f329b0
--- /dev/null
@@ -0,0 +1,11 @@
+Description
+===========
+Test custom eve DNS logging by configuring it to log only HTTPS records, and verifying that only HTTPS records are logged.
+
+PCAP
+====
+PCAP comes from the redmine ticket [4751](https://redmine.openinfosecfoundation.org/issues/4751)
+
+Redmine ticket
+==============
+https://redmine.openinfosecfoundation.org/issues/4751
diff --git a/tests/dns-eve-log-https-only/suricata.yaml b/tests/dns-eve-log-https-only/suricata.yaml
new file mode 100644 (file)
index 0000000..16f00d2
--- /dev/null
@@ -0,0 +1,11 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      filetype: regular
+      filename: eve.json
+      types:
+        - dns:
+            types: [https]
diff --git a/tests/dns-eve-log-https-only/test.pcap b/tests/dns-eve-log-https-only/test.pcap
new file mode 100644 (file)
index 0000000..3fbac10
Binary files /dev/null and b/tests/dns-eve-log-https-only/test.pcap differ
diff --git a/tests/dns-eve-log-https-only/test.yaml b/tests/dns-eve-log-https-only/test.yaml
new file mode 100644 (file)
index 0000000..f7182e0
--- /dev/null
@@ -0,0 +1,10 @@
+requires:
+  min-version: 7
+
+checks:
+  # Check that we only have requests and responses for HTTPS records.
+- filter:
+    count: 1
+    match:
+      event_type: "dns"
+      dns.rrtype: "HTTPS"