Skip to content

Commit

Permalink
exception-policy: fix test to be more robust
Browse files Browse the repository at this point in the history
We do not want to test number of alerts on every pseudo-packets

Ticket: 6578
  • Loading branch information
catenacyber committed Dec 5, 2023
1 parent 3a50df6 commit b7a8ffd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion tests/exception-policy-simulated-flow-memcap/test.rules
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
alert tls any any -> any any (msg:"tls app-proto"; sid:1000001; rev:1;)
# do not test alert for every tls, as there can be additional pseudo-packets
# alert tls any any -> any any (msg:"tls app-proto"; sid:1000001; rev:1;)
alert tls any any -> any any (msg:"Stamus TLS"; tls_cert_issuer; content:"O=Stamus"; sid:1; rev:1;)
9 changes: 5 additions & 4 deletions tests/exception-policy-simulated-flow-memcap/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ args:
- --set flow.memcap-policy=drop-flow

checks:
- filter:
count: 97
match:
event_type: alert
- filter:
count: 1
match:
Expand All @@ -30,3 +26,8 @@ checks:
match:
event_type: stats
stats.tcp.midstream_pickups: 1
- filter:
count: 4
match:
event_type: alert
alert.signature_id: 1

0 comments on commit b7a8ffd

Please sign in to comment.