The test.yaml files were missing the command set to compare eve.json
output and to run without a pcap file, therefore being simply skipped
for lack of a pcap file.
Also took the opportunity to make these compatible with new error
message formats for Suricata 7.
Test 1 also had a typo in the expected message to be checked, making it
fail.
-requires:
- min-version: 7.0.0
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
checks:
- # check that we have the following entres in eve.json
+ # check that we have the following entries in eve.json
# match 1 specific rule load failure reason
- filter:
+ lt-version: 7
count: 1
match:
event_type: engine
- engine.message: "rule 1111: A pattern with uppercase chararacters detected for http.host. The hostname buffer is normalized to lowercase, please specify a lowercase pattern."
-
+ engine.error: "SC_ERR_NO_RULES_LOADED"
- filter:
+ min-version: 7
count: 1
match:
event_type: engine
- engine.error: "SC_ERR_NO_RULES_LOADED"
+ engine.message: "rule 1111: A pattern with uppercase characters detected for http.host. The hostname buffer is normalized to lowercase, please specify a lowercase pattern."
+ - filter:
+ min-version: 7
+ count: 3
+ match:
+ event_type: engine
+ engine.module: detect
-requires:
- min-version: 7.0.0
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${SRCDIR}/classification.config" --set reference-config-file="${SRCDIR}/reference.config" -l ${OUTPUT_DIR} -c ${TEST_DIR}/suricata.yaml -r ${TEST_DIR}/ -S ${TEST_DIR}/test.rules
checks:
- # check that we have the following entres in eve.json
+ # check that we have the following entries in eve.json
# match 1 specific rule load failure reason
- filter:
+ lt-version: 7
count: 1
match:
event_type: engine
- engine.message: "rule 123: http.host keyword specified along with \"nocase\". The hostname buffer is normalized to lowercase, specifying nocase is redundant."
-
+ engine.error: "SC_ERR_NO_RULES_LOADED"
- filter:
+ min-version: 7
count: 1
match:
event_type: engine
- engine.error: "SC_ERR_NO_RULES_LOADED"
+ engine.message: "rule 123: http.host keyword specified along with \"nocase\". The hostname buffer is normalized to lowercase, specifying nocase is redundant."
+ - filter:
+ min-version: 7
+ count: 3
+ match:
+ event_type: engine
+ engine.module: detect
+