These test cases exercise classification.config validation checking.
--- /dev/null
+this is not correct
--- /dev/null
+alert tcp any any -> any 25 (msg:"ET POLICY Inbound Frequent Emails - Possible Spambot Inbound"; \
+ flow:established; content:"mail from|3a|"; nocase; \
+ threshold: type threshold, track by_src, count 10, seconds 60; \
+ reference:url,doc.emergingthreats.net/2002087; classtype:misc-activity; sid:2002087; rev:10;)
--- /dev/null
+requires:
+ min-version: 7
+
+command: |
+ ${SRCDIR}/src/suricata --set classification-file="${TEST_DIR}/classification.config" -l ${OUTPUT_DIR} -c ${SRCDIR}/suricata.yaml -S ${TEST_DIR}/test.rules -T
+
+exit-code: 1
+
+checks:
+ - shell:
+ args: grep "SC_WARN_CLASSIFICATION_CONFIG" suricata.log | wc -l | xargs
+ expect: 1
--- /dev/null
+this is not correct
--- /dev/null
+alert tcp any any -> any 25 (msg:"ET POLICY Inbound Frequent Emails - Possible Spambot Inbound"; \
+ flow:established; content:"mail from|3a|"; nocase; \
+ threshold: type threshold, track by_src, count 10, seconds 60; \
+ reference:url,doc.emergingthreats.net/2002087; classtype:misc-activity; sid:2002087; rev:10;)
--- /dev/null
+requires:
+ min-version: 7
+
+command: |
+ ${SRCDIR}/src/suricata -v --set classification-file="${TEST_DIR}/classification.config" -l ${OUTPUT_DIR} -c ${SRCDIR}/suricata.yaml -S ${TEST_DIR}/test.rules -r ${TEST_DIR}/input.pcap
+
+checks:
+
+ - shell:
+ args: grep -e "SC_WARN_CLASSIFICATION_CONFIG" suricata.log | wc -l | xargs
+ expect: 1