Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test about enip stats with _udp prefix #1504

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/enip-stats-udp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Description

Test ENIP stats always have `_udp` or `_tcp` prefix
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how this is tested?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Json schema verification

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As CI failure with current master shows

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect a check for the stats by name, as that is what the work is about I think

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, doing a next iteration.


# Issue

https://redmine.openinfosecfoundation.org/issues/6304

# PCAP

The pcap is reused enip-alert test
18 changes: 18 additions & 0 deletions tests/enip-stats-udp/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
---

outputs:
- eve-log:
enabled: yes
filetype: regular
filename: eve.json
types:
- flow
- stats

app-layer:
protocols:
enip:
enabled: detection-only
detection-ports:
dp: 44818
15 changes: 15 additions & 0 deletions tests/enip-stats-udp/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
requires:
min-version: 8

pcap: ../enip-alert/enip_test1.pcap

# disables checksum verification
args:
- -k none --set stream.midstream=true

checks:
- filter:
count: 1
match:
event_type: flow
app_proto: enip
Loading