]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add tcp async testmyids test
authorVictor Julien <victor@inliniac.net>
Thu, 17 Dec 2020 09:52:59 +0000 (10:52 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 17 Dec 2020 09:52:59 +0000 (10:52 +0100)
tests/alert-testmyids-async/input.pcap [new file with mode: 0644]
tests/alert-testmyids-async/test.rules [new file with mode: 0644]
tests/alert-testmyids-async/test.yaml [new file with mode: 0644]

diff --git a/tests/alert-testmyids-async/input.pcap b/tests/alert-testmyids-async/input.pcap
new file mode 100644 (file)
index 0000000..3feb74e
Binary files /dev/null and b/tests/alert-testmyids-async/input.pcap differ
diff --git a/tests/alert-testmyids-async/test.rules b/tests/alert-testmyids-async/test.rules
new file mode 100644 (file)
index 0000000..9f1307b
--- /dev/null
@@ -0,0 +1 @@
+alert ip any any -> any any (msg:"GPL ATTACK_RESPONSE id check returned root"; content:"uid=0|28|root|29|"; classtype:bad-unknown; sid:2100498; rev:7;)
diff --git a/tests/alert-testmyids-async/test.yaml b/tests/alert-testmyids-async/test.yaml
new file mode 100644 (file)
index 0000000..7e39e82
--- /dev/null
@@ -0,0 +1,22 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+  min-version: 5.0.0
+args:
+- --set stream.midstream=true
+- --set stream.async-oneside=true
+
+checks:
+
+  # Check that we only have one alert event type in eve.
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        src_port: 80
+
+  - filter:
+      count: 1
+      match:
+        event_type: http
+        dest_port: 80