From b337a349e45e8098f2c8976ebff5c1e222cb6ca1 Mon Sep 17 00:00:00 2001 From: Alice Akaki Date: Wed, 9 Oct 2024 23:42:40 -0400 Subject: [PATCH] tests: add rule type check for icmp_id Ticket: #6360 --- tests/rules/icmp_id/test.rules | 1 + tests/rules/icmp_id/test.yaml | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/rules/icmp_id/test.rules create mode 100644 tests/rules/icmp_id/test.yaml diff --git a/tests/rules/icmp_id/test.rules b/tests/rules/icmp_id/test.rules new file mode 100644 index 000000000..23f989950 --- /dev/null +++ b/tests/rules/icmp_id/test.rules @@ -0,0 +1 @@ +alert icmp any any -> any any (msg:"Testing icmp_id"; icmp_id:2; sid:1;) diff --git a/tests/rules/icmp_id/test.yaml b/tests/rules/icmp_id/test.yaml new file mode 100644 index 000000000..b3285e46e --- /dev/null +++ b/tests/rules/icmp_id/test.yaml @@ -0,0 +1,15 @@ +requires: + min-version: 8.0 + pcap: false + +args: + - --engine-analysis + +checks: +- filter: + filename: rules.json + count: 1 + match: + id: 1 + lists.packet.matches[0].name: "icmp_id" + lists.packet.matches[0].id.number: 2 \ No newline at end of file