This test only ensures that Suricata does drop packet/flow after
reaching an exception condition with a 'reject' policy.
Related to
Task #5503
--- /dev/null
+# Test
+
+Check that the reject action for the exception policies is minimally functional.
+We don't check that the reject packet was created and sent, just that the
+packet/flow is dropped.
+
+# Behavior
+
+We expect to only see ``drop`` and ``flow`` events logged, as the flow will be
+droped.
+
+# Pcap
+
+Pcap is the result of a curl to www.testmyids.com, later extracted with
+Wireshark to keep the ``http`` packets only.
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - eve-log:
+ enabled: yes
+ types:
+ - alert:
+ - flow
+ - http
+ - drop:
+ alerts: yes
+ flows: all
--- /dev/null
+drop http any any -> any any (msg:"broad http rule"; sid:1;)
--- /dev/null
+args:
+- --simulate-ips
+- --set stream.midstream-policy=reject
+
+checks:
+ - filter:
+ count: 0
+ match:
+ event_type: http
+ - filter:
+ count: 2
+ match:
+ event_type: drop
+ - filter:
+ count: 1
+ match:
+ event_type: flow
+ flow.action: drop
+