]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add rule type check for icmp_id 2095/head
authorAlice Akaki <akakialice@gmail.com>
Thu, 10 Oct 2024 03:42:40 +0000 (23:42 -0400)
committerVictor Julien <victor@inliniac.net>
Tue, 15 Oct 2024 11:54:29 +0000 (13:54 +0200)
Ticket: #6360

tests/rules/icmp_id/test.rules [new file with mode: 0644]
tests/rules/icmp_id/test.yaml [new file with mode: 0644]

diff --git a/tests/rules/icmp_id/test.rules b/tests/rules/icmp_id/test.rules
new file mode 100644 (file)
index 0000000..23f9899
--- /dev/null
@@ -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 (file)
index 0000000..b3285e4
--- /dev/null
@@ -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