From db01d566a9f1ac6046cbbf606409cb23c6ea2bef Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Sun, 25 Aug 2024 22:28:01 +0200 Subject: [PATCH] tests: move pcaps to tests where they are used Following removal of tests only used in 6, some directories were left with only a pcap, that got used by other tests. Found with command for pcap in $(find . -name *.pcap); do if ! test -e "$(dirname $pcap)/test.yaml"; then echo "$(dirname $pcap)"; fi; done --- .../empty.pcap | Bin .../test.yaml | 2 -- .../{decode-vntag-03 => decode-vntag-01}/input.pcap | Bin tests/decode-vntag-01/test.yaml | 2 -- tests/decode-vntag-02/test.yaml | 2 +- .../dns-single-request}/input.pcap | Bin tests/dns/dns-single-request/test.yaml | 2 -- .../dns-tcp-www-google-com}/dns.pcap | Bin tests/dns/dns-tcp-www-google-com/test.yaml | 2 -- .../dns-udp-double-request-response.pcap | Bin tests/dns/dns-udp-double-request-response/test.yaml | 2 -- tests/dns/dns-udp-eve-log-aaaa-only/test.yaml | 2 +- .../dns-udp-google.com-a-aaaa-mx.pcap | Bin tests/dns/dns-udp-eve-log-answer-only/test.yaml | 2 -- tests/dns/dns-udp-eve-log-mx-only/test.yaml | 2 +- tests/dns/dns-udp-eve-log-query-only/test.yaml | 2 +- .../dns-response-2x.pcap | Bin tests/dns/dns-udp-unsolicited-response/test.yaml | 2 -- tests/dns/v2/dns-single-request/test.yaml | 2 +- tests/dns/v2/dns-tcp-www-google-com/test.yaml | 2 +- .../v2/dns-udp-double-request-response/test.yaml | 2 +- tests/dns/v2/dns-udp-eve-log-aaaa-only/test.yaml | 2 +- tests/dns/v2/dns-udp-eve-log-answer-only/test.yaml | 2 +- tests/dns/v2/dns-udp-eve-log-mx-only/test.yaml | 2 +- tests/dns/v2/dns-udp-eve-log-query-only/test.yaml | 2 +- tests/dns/v2/dns-udp-unsolicited-response/test.yaml | 2 +- 26 files changed, 12 insertions(+), 26 deletions(-) rename tests/{content-incomplete-hex-t-version-6-init-errors-fatal => content-incomplete-hex-t-version-7-init-errors-fatal}/empty.pcap (100%) rename tests/{decode-vntag-03 => decode-vntag-01}/input.pcap (100%) rename tests/{dns-single-request-v1 => dns/dns-single-request}/input.pcap (100%) rename tests/{dns-tcp-www-google-com-v1 => dns/dns-tcp-www-google-com}/dns.pcap (100%) rename tests/{dns-udp-double-request-response-v1 => dns/dns-udp-double-request-response}/dns-udp-double-request-response.pcap (100%) rename tests/{dns-udp-eve-log-query-only-v1 => dns/dns-udp-eve-log-answer-only}/dns-udp-google.com-a-aaaa-mx.pcap (100%) rename tests/{dns-udp-unsolicited-response-v1 => dns/dns-udp-unsolicited-response}/dns-response-2x.pcap (100%) diff --git a/tests/content-incomplete-hex-t-version-6-init-errors-fatal/empty.pcap b/tests/content-incomplete-hex-t-version-7-init-errors-fatal/empty.pcap similarity index 100% rename from tests/content-incomplete-hex-t-version-6-init-errors-fatal/empty.pcap rename to tests/content-incomplete-hex-t-version-7-init-errors-fatal/empty.pcap diff --git a/tests/content-incomplete-hex-t-version-7-init-errors-fatal/test.yaml b/tests/content-incomplete-hex-t-version-7-init-errors-fatal/test.yaml index 8bd980fb3..85764cb5a 100644 --- a/tests/content-incomplete-hex-t-version-7-init-errors-fatal/test.yaml +++ b/tests/content-incomplete-hex-t-version-7-init-errors-fatal/test.yaml @@ -1,5 +1,3 @@ -pcap: ../content-incomplete-hex-t-version-6-init-errors-fatal/empty.pcap - requires: min-version: 7 diff --git a/tests/decode-vntag-03/input.pcap b/tests/decode-vntag-01/input.pcap similarity index 100% rename from tests/decode-vntag-03/input.pcap rename to tests/decode-vntag-01/input.pcap diff --git a/tests/decode-vntag-01/test.yaml b/tests/decode-vntag-01/test.yaml index 627ec0d26..199d4488f 100644 --- a/tests/decode-vntag-01/test.yaml +++ b/tests/decode-vntag-01/test.yaml @@ -1,5 +1,3 @@ -pcap: ../decode-vntag-03/input.pcap - requires: min-version: 7 diff --git a/tests/decode-vntag-02/test.yaml b/tests/decode-vntag-02/test.yaml index 6d464e56f..f241cc855 100644 --- a/tests/decode-vntag-02/test.yaml +++ b/tests/decode-vntag-02/test.yaml @@ -1,4 +1,4 @@ -pcap: ../decode-vntag-03/input.pcap +pcap: ../decode-vntag-01/input.pcap requires: diff --git a/tests/dns-single-request-v1/input.pcap b/tests/dns/dns-single-request/input.pcap similarity index 100% rename from tests/dns-single-request-v1/input.pcap rename to tests/dns/dns-single-request/input.pcap diff --git a/tests/dns/dns-single-request/test.yaml b/tests/dns/dns-single-request/test.yaml index 0078384f2..164d81033 100644 --- a/tests/dns/dns-single-request/test.yaml +++ b/tests/dns/dns-single-request/test.yaml @@ -1,5 +1,3 @@ -pcap: ../../dns-single-request-v1/input.pcap - requires: min-version: 8 diff --git a/tests/dns-tcp-www-google-com-v1/dns.pcap b/tests/dns/dns-tcp-www-google-com/dns.pcap similarity index 100% rename from tests/dns-tcp-www-google-com-v1/dns.pcap rename to tests/dns/dns-tcp-www-google-com/dns.pcap diff --git a/tests/dns/dns-tcp-www-google-com/test.yaml b/tests/dns/dns-tcp-www-google-com/test.yaml index 6f7575459..5d4de94ca 100644 --- a/tests/dns/dns-tcp-www-google-com/test.yaml +++ b/tests/dns/dns-tcp-www-google-com/test.yaml @@ -1,8 +1,6 @@ requires: min-version: 8 -pcap: ../../dns-tcp-www-google-com-v1/dns.pcap - checks: - filter: count: 1 diff --git a/tests/dns-udp-double-request-response-v1/dns-udp-double-request-response.pcap b/tests/dns/dns-udp-double-request-response/dns-udp-double-request-response.pcap similarity index 100% rename from tests/dns-udp-double-request-response-v1/dns-udp-double-request-response.pcap rename to tests/dns/dns-udp-double-request-response/dns-udp-double-request-response.pcap diff --git a/tests/dns/dns-udp-double-request-response/test.yaml b/tests/dns/dns-udp-double-request-response/test.yaml index 639a6364f..5f208b737 100644 --- a/tests/dns/dns-udp-double-request-response/test.yaml +++ b/tests/dns/dns-udp-double-request-response/test.yaml @@ -1,5 +1,3 @@ -pcap: ../../dns-udp-double-request-response-v1/dns-udp-double-request-response.pcap - requires: min-version: 8 diff --git a/tests/dns/dns-udp-eve-log-aaaa-only/test.yaml b/tests/dns/dns-udp-eve-log-aaaa-only/test.yaml index 4acf17876..93c1342db 100644 --- a/tests/dns/dns-udp-eve-log-aaaa-only/test.yaml +++ b/tests/dns/dns-udp-eve-log-aaaa-only/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap +pcap: ../../dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap requires: min-version: 8 diff --git a/tests/dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap b/tests/dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap similarity index 100% rename from tests/dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap rename to tests/dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap diff --git a/tests/dns/dns-udp-eve-log-answer-only/test.yaml b/tests/dns/dns-udp-eve-log-answer-only/test.yaml index d55921072..079cce8f2 100644 --- a/tests/dns/dns-udp-eve-log-answer-only/test.yaml +++ b/tests/dns/dns-udp-eve-log-answer-only/test.yaml @@ -1,8 +1,6 @@ requires: min-version: 8 -pcap: ../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap - checks: - filter: count: 0 diff --git a/tests/dns/dns-udp-eve-log-mx-only/test.yaml b/tests/dns/dns-udp-eve-log-mx-only/test.yaml index 00b337b83..649405a9b 100644 --- a/tests/dns/dns-udp-eve-log-mx-only/test.yaml +++ b/tests/dns/dns-udp-eve-log-mx-only/test.yaml @@ -1,7 +1,7 @@ requires: min-version: 8 -pcap: ../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap +pcap: ../../dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap checks: - filter: diff --git a/tests/dns/dns-udp-eve-log-query-only/test.yaml b/tests/dns/dns-udp-eve-log-query-only/test.yaml index b9c1c8d94..1e401fdf8 100644 --- a/tests/dns/dns-udp-eve-log-query-only/test.yaml +++ b/tests/dns/dns-udp-eve-log-query-only/test.yaml @@ -1,7 +1,7 @@ requires: min-version: 8 -pcap: ../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap +pcap: ../../dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap checks: - filter: diff --git a/tests/dns-udp-unsolicited-response-v1/dns-response-2x.pcap b/tests/dns/dns-udp-unsolicited-response/dns-response-2x.pcap similarity index 100% rename from tests/dns-udp-unsolicited-response-v1/dns-response-2x.pcap rename to tests/dns/dns-udp-unsolicited-response/dns-response-2x.pcap diff --git a/tests/dns/dns-udp-unsolicited-response/test.yaml b/tests/dns/dns-udp-unsolicited-response/test.yaml index 3f857b39b..22345ad0f 100644 --- a/tests/dns/dns-udp-unsolicited-response/test.yaml +++ b/tests/dns/dns-udp-unsolicited-response/test.yaml @@ -1,8 +1,6 @@ requires: min-version: 8 -pcap: ../../dns-udp-unsolicited-response-v1/dns-response-2x.pcap - checks: - filter: count: 1 diff --git a/tests/dns/v2/dns-single-request/test.yaml b/tests/dns/v2/dns-single-request/test.yaml index 56b3a81bb..7e1933eab 100644 --- a/tests/dns/v2/dns-single-request/test.yaml +++ b/tests/dns/v2/dns-single-request/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../../dns-single-request-v1/input.pcap +pcap: ../../../dns/dns-single-request/input.pcap checks: - filter: diff --git a/tests/dns/v2/dns-tcp-www-google-com/test.yaml b/tests/dns/v2/dns-tcp-www-google-com/test.yaml index b9331008e..e4ad8fe5f 100644 --- a/tests/dns/v2/dns-tcp-www-google-com/test.yaml +++ b/tests/dns/v2/dns-tcp-www-google-com/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../../dns-tcp-www-google-com-v1/dns.pcap +pcap: ../../../dns/dns-tcp-www-google-com/dns.pcap checks: - filter: diff --git a/tests/dns/v2/dns-udp-double-request-response/test.yaml b/tests/dns/v2/dns-udp-double-request-response/test.yaml index 25311ee3b..15c40bac6 100644 --- a/tests/dns/v2/dns-udp-double-request-response/test.yaml +++ b/tests/dns/v2/dns-udp-double-request-response/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../../dns-udp-double-request-response-v1/dns-udp-double-request-response.pcap +pcap: ../../../dns/dns-udp-double-request-response/dns-udp-double-request-response.pcap checks: - filter: diff --git a/tests/dns/v2/dns-udp-eve-log-aaaa-only/test.yaml b/tests/dns/v2/dns-udp-eve-log-aaaa-only/test.yaml index 4b4c8c784..f9a9ebbaf 100644 --- a/tests/dns/v2/dns-udp-eve-log-aaaa-only/test.yaml +++ b/tests/dns/v2/dns-udp-eve-log-aaaa-only/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap +pcap: ../../../dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap checks: - filter: diff --git a/tests/dns/v2/dns-udp-eve-log-answer-only/test.yaml b/tests/dns/v2/dns-udp-eve-log-answer-only/test.yaml index 837e3b59c..00fd8bce8 100644 --- a/tests/dns/v2/dns-udp-eve-log-answer-only/test.yaml +++ b/tests/dns/v2/dns-udp-eve-log-answer-only/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap +pcap: ../../../dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap checks: - filter: diff --git a/tests/dns/v2/dns-udp-eve-log-mx-only/test.yaml b/tests/dns/v2/dns-udp-eve-log-mx-only/test.yaml index 94f6d0cc1..af5b9b7d5 100644 --- a/tests/dns/v2/dns-udp-eve-log-mx-only/test.yaml +++ b/tests/dns/v2/dns-udp-eve-log-mx-only/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap +pcap: ../../../dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap checks: - filter: diff --git a/tests/dns/v2/dns-udp-eve-log-query-only/test.yaml b/tests/dns/v2/dns-udp-eve-log-query-only/test.yaml index 09793dfb3..53229b9ca 100644 --- a/tests/dns/v2/dns-udp-eve-log-query-only/test.yaml +++ b/tests/dns/v2/dns-udp-eve-log-query-only/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../../dns-udp-eve-log-query-only-v1/dns-udp-google.com-a-aaaa-mx.pcap +pcap: ../../../dns/dns-udp-eve-log-answer-only/dns-udp-google.com-a-aaaa-mx.pcap requires: features: diff --git a/tests/dns/v2/dns-udp-unsolicited-response/test.yaml b/tests/dns/v2/dns-udp-unsolicited-response/test.yaml index 03619f38e..f273682fd 100644 --- a/tests/dns/v2/dns-udp-unsolicited-response/test.yaml +++ b/tests/dns/v2/dns-udp-unsolicited-response/test.yaml @@ -1,4 +1,4 @@ -pcap: ../../../dns-udp-unsolicited-response-v1/dns-response-2x.pcap +pcap: ../../../dns/dns-udp-unsolicited-response/dns-response-2x.pcap checks: - filter: -- 2.47.2