]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: Add tests for issue 3490
authorJeff Lucovsky <jeff@lucovsky.org>
Sun, 23 Feb 2020 19:55:22 +0000 (14:55 -0500)
committerVictor Julien <victor@inliniac.net>
Tue, 25 Feb 2020 09:42:15 +0000 (10:42 +0100)
tests/bug-3490/test.rules [new file with mode: 0644]
tests/bug-3490/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-3490/test.rules b/tests/bug-3490/test.rules
new file mode 100644 (file)
index 0000000..95078f9
--- /dev/null
@@ -0,0 +1,2 @@
+alert snmp any any -> any any (msg:"SNMP test1"; snmp.version; sid:1000003;)
+alert snmp any any -> any any (msg:"SNMP test2"; snmp.pdu_type; sid:1000007;)
diff --git a/tests/bug-3490/test.yaml b/tests/bug-3490/test.yaml
new file mode 100644 (file)
index 0000000..cd526c1
--- /dev/null
@@ -0,0 +1,17 @@
+requires:
+  # No pcap required.
+  pcap: false
+
+exit-code: 1
+
+args:
+  - --engine-analysis
+
+checks:
+    - shell:
+        args: grep "snmp.pdu_type requires a value" suricata.log| wc -l | xargs
+        expect: 1
+
+    - shell:
+        args: grep "snmp.version requires a value" suricata.log| wc -l | xargs
+        expect: 1