From 46412fd72d75ff89a9a0a8ef1b744673e38567c7 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Thu, 4 Jul 2024 18:02:40 -0600 Subject: [PATCH] dns-single-request: v2 and v3 tests --- tests/{ => dns}/dns-single-request/README.md | 0 tests/{ => dns}/dns-single-request/suricata.yaml | 0 tests/dns/dns-single-request/test.yaml | 14 ++++++++++++++ tests/dns/v2/dns-single-request/README.md | 1 + tests/dns/v2/dns-single-request/suricata.yaml | 10 ++++++++++ tests/{ => dns/v2}/dns-single-request/test.yaml | 6 +----- 6 files changed, 26 insertions(+), 5 deletions(-) rename tests/{ => dns}/dns-single-request/README.md (100%) rename tests/{ => dns}/dns-single-request/suricata.yaml (100%) create mode 100644 tests/dns/dns-single-request/test.yaml create mode 100644 tests/dns/v2/dns-single-request/README.md create mode 100644 tests/dns/v2/dns-single-request/suricata.yaml rename tests/{ => dns/v2}/dns-single-request/test.yaml (61%) diff --git a/tests/dns-single-request/README.md b/tests/dns/dns-single-request/README.md similarity index 100% rename from tests/dns-single-request/README.md rename to tests/dns/dns-single-request/README.md diff --git a/tests/dns-single-request/suricata.yaml b/tests/dns/dns-single-request/suricata.yaml similarity index 100% rename from tests/dns-single-request/suricata.yaml rename to tests/dns/dns-single-request/suricata.yaml diff --git a/tests/dns/dns-single-request/test.yaml b/tests/dns/dns-single-request/test.yaml new file mode 100644 index 000000000..0078384f2 --- /dev/null +++ b/tests/dns/dns-single-request/test.yaml @@ -0,0 +1,14 @@ +pcap: ../../dns-single-request-v1/input.pcap + +requires: + min-version: 8 + +checks: + - filter: + count: 1 + match: + dns.type: request + - filter: + count: 1 + match: + dns.type: response diff --git a/tests/dns/v2/dns-single-request/README.md b/tests/dns/v2/dns-single-request/README.md new file mode 100644 index 000000000..29dacb251 --- /dev/null +++ b/tests/dns/v2/dns-single-request/README.md @@ -0,0 +1 @@ +Check a simple DNS request and response. diff --git a/tests/dns/v2/dns-single-request/suricata.yaml b/tests/dns/v2/dns-single-request/suricata.yaml new file mode 100644 index 000000000..4db348acd --- /dev/null +++ b/tests/dns/v2/dns-single-request/suricata.yaml @@ -0,0 +1,10 @@ +%YAML 1.1 +--- + +outputs: + - eve-log: + enabled: yes + filename: eve.json + types: + - dns: + version: 2 diff --git a/tests/dns-single-request/test.yaml b/tests/dns/v2/dns-single-request/test.yaml similarity index 61% rename from tests/dns-single-request/test.yaml rename to tests/dns/v2/dns-single-request/test.yaml index a3a2cde7f..56b3a81bb 100644 --- a/tests/dns-single-request/test.yaml +++ b/tests/dns/v2/dns-single-request/test.yaml @@ -1,8 +1,4 @@ -pcap: ../dns-single-request-v1/input.pcap - -requires: - features: - - HAVE_LIBJANSSON +pcap: ../../../dns-single-request-v1/input.pcap checks: - filter: -- 2.47.2