From: Jason Ish Date: Thu, 4 Jul 2024 21:39:05 +0000 (-0600) Subject: dns-udp-eve-log-aaaa-only: v2 and v3 tests X-Git-Tag: suricata-7.0.7~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ac9e6a3fced7a38f26f5a88071a40d7d6206874;p=thirdparty%2Fsuricata-verify.git dns-udp-eve-log-aaaa-only: v2 and v3 tests --- diff --git a/tests/dns-udp-eve-log-aaaa-only/README.md b/tests/dns/dns-udp-eve-log-aaaa-only/README.md similarity index 100% rename from tests/dns-udp-eve-log-aaaa-only/README.md rename to tests/dns/dns-udp-eve-log-aaaa-only/README.md diff --git a/tests/dns-udp-eve-log-aaaa-only/suricata.yaml b/tests/dns/dns-udp-eve-log-aaaa-only/suricata.yaml similarity index 100% rename from tests/dns-udp-eve-log-aaaa-only/suricata.yaml rename to tests/dns/dns-udp-eve-log-aaaa-only/suricata.yaml diff --git a/tests/dns/dns-udp-eve-log-aaaa-only/test.yaml b/tests/dns/dns-udp-eve-log-aaaa-only/test.yaml new file mode 100644 index 000000000..4acf17876 --- /dev/null +++ b/tests/dns/dns-udp-eve-log-aaaa-only/test.yaml @@ -0,0 +1,21 @@ +pcap: ../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap + +requires: + min-version: 8 + +checks: + - filter: + count: 1 + match: + dns.type: request + dns.queries[0].rrtype: AAAA + - filter: + count: 1 + match: + dns.type: response + dns.answers[0].rrtype: AAAA + dns.answers.__len: 1 + - filter: + count: 0 + match: + dns.rrtype: A diff --git a/tests/dns/v2/dns-udp-eve-log-aaaa-only/README.md b/tests/dns/v2/dns-udp-eve-log-aaaa-only/README.md new file mode 100644 index 000000000..88649bff1 --- /dev/null +++ b/tests/dns/v2/dns-udp-eve-log-aaaa-only/README.md @@ -0,0 +1,2 @@ +Test custom eve DNS logging by configuring it to log only AAAA +records, and verifying that only AAAA records are logged. diff --git a/tests/dns/v2/dns-udp-eve-log-aaaa-only/suricata.yaml b/tests/dns/v2/dns-udp-eve-log-aaaa-only/suricata.yaml new file mode 100644 index 000000000..7dfe440eb --- /dev/null +++ b/tests/dns/v2/dns-udp-eve-log-aaaa-only/suricata.yaml @@ -0,0 +1,12 @@ +%YAML 1.1 +--- + +outputs: + - eve-log: + enabled: yes + filetype: regular + filename: eve.json + types: + - dns: + version: 2 + types: [aaaa] diff --git a/tests/dns-udp-eve-log-aaaa-only/test.yaml b/tests/dns/v2/dns-udp-eve-log-aaaa-only/test.yaml similarity index 68% rename from tests/dns-udp-eve-log-aaaa-only/test.yaml rename to tests/dns/v2/dns-udp-eve-log-aaaa-only/test.yaml index c20ca3273..4b4c8c784 100644 --- a/tests/dns-udp-eve-log-aaaa-only/test.yaml +++ b/tests/dns/v2/dns-udp-eve-log-aaaa-only/test.yaml @@ -1,8 +1,4 @@ -pcap: ../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap - -requires: - features: - - HAVE_LIBJANSSON +pcap: ../../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap checks: - filter: