From 1959a7b5127f7b229a57fa6b130b0a6dfce0fd46 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Fri, 12 Mar 2021 17:15:08 -0600 Subject: [PATCH] dns-single-request: split into dns v1 and v2 test Update dns-single-request to v2 format, rename old test to dns-single-request-v1. --- tests/dns-single-request-v1/README.md | 1 + .../check.sh | 0 tests/dns-single-request-v1/input.pcap | Bin 0 -> 214 bytes tests/dns-single-request-v1/suricata.yaml | 10 ++++++++++ tests/dns-single-request-v1/test.yaml | 4 ++++ tests/dns-single-request/suricata.yaml | 1 - tests/dns-single-request/test.yaml | 10 ++++++++++ 7 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 tests/dns-single-request-v1/README.md rename tests/{dns-single-request => dns-single-request-v1}/check.sh (100%) create mode 100644 tests/dns-single-request-v1/input.pcap create mode 100644 tests/dns-single-request-v1/suricata.yaml create mode 100644 tests/dns-single-request-v1/test.yaml diff --git a/tests/dns-single-request-v1/README.md b/tests/dns-single-request-v1/README.md new file mode 100644 index 000000000..29dacb251 --- /dev/null +++ b/tests/dns-single-request-v1/README.md @@ -0,0 +1 @@ +Check a simple DNS request and response. diff --git a/tests/dns-single-request/check.sh b/tests/dns-single-request-v1/check.sh similarity index 100% rename from tests/dns-single-request/check.sh rename to tests/dns-single-request-v1/check.sh diff --git a/tests/dns-single-request-v1/input.pcap b/tests/dns-single-request-v1/input.pcap new file mode 100644 index 0000000000000000000000000000000000000000..87682e7b4df0f07760111bbc33b77f83e276ef6b GIT binary patch literal 214 zc-p&ic+)~A1{MYcU}0bcl1F|rMEne4W^f0xL6|{QoR{tUjniFk7rJpUxH2$Uz7kms$c6WCR)eA&i+J94HCG y5Cb8GgN^lE`^y1nY*`)1NRZJCrXYhIEn)z||(5Gf0729~W4y7~ZooibGb literal 0 Hc-jL100001 diff --git a/tests/dns-single-request-v1/suricata.yaml b/tests/dns-single-request-v1/suricata.yaml new file mode 100644 index 000000000..5f7eded22 --- /dev/null +++ b/tests/dns-single-request-v1/suricata.yaml @@ -0,0 +1,10 @@ +%YAML 1.1 +--- + +outputs: + - eve-log: + enabled: yes + filename: eve.json + types: + - dns: + version: 1 diff --git a/tests/dns-single-request-v1/test.yaml b/tests/dns-single-request-v1/test.yaml new file mode 100644 index 000000000..9ee272d75 --- /dev/null +++ b/tests/dns-single-request-v1/test.yaml @@ -0,0 +1,4 @@ +requires: + features: + - HAVE_LIBJANSSON + lt-version: 7 diff --git a/tests/dns-single-request/suricata.yaml b/tests/dns-single-request/suricata.yaml index 5f7eded22..bf949095f 100644 --- a/tests/dns-single-request/suricata.yaml +++ b/tests/dns-single-request/suricata.yaml @@ -7,4 +7,3 @@ outputs: filename: eve.json types: - dns: - version: 1 diff --git a/tests/dns-single-request/test.yaml b/tests/dns-single-request/test.yaml index 56ea9b0d5..6e799f63b 100644 --- a/tests/dns-single-request/test.yaml +++ b/tests/dns-single-request/test.yaml @@ -1,3 +1,13 @@ requires: features: - HAVE_LIBJANSSON + +checks: + - filter: + count: 1 + match: + dns.type: query + - filter: + count: 1 + match: + dns.type: answer -- 2.47.2