diff --git a/tests/runmode-warn-5711/README.md b/tests/runmode-warn-5711/README.md new file mode 100644 index 000000000..1fb8f07b5 --- /dev/null +++ b/tests/runmode-warn-5711/README.md @@ -0,0 +1,7 @@ +## Description + +Test that a warning is given in case a cmdline option was provided but no runmode was specified. + +### Ticket + +https://redmine.openinfosecfoundation.org/issues/5711 diff --git a/tests/runmode-warn-5711/blah.rules b/tests/runmode-warn-5711/blah.rules new file mode 100644 index 000000000..1ab0f4f4d --- /dev/null +++ b/tests/runmode-warn-5711/blah.rules @@ -0,0 +1 @@ +# Nothing to see here. Just a placeholder. diff --git a/tests/runmode-warn-5711/test.yaml b/tests/runmode-warn-5711/test.yaml new file mode 100644 index 000000000..1b959bc96 --- /dev/null +++ b/tests/runmode-warn-5711/test.yaml @@ -0,0 +1,13 @@ +requires: + min-version: 9 + +pcap: false +command: | + ${SRCDIR}/src/suricata -S ${TEST_DIR}/blah.rules + +exit-code: 1 + +checks: + - shell: + args: grep "Please specify a runmode or capture option. Use --list-runmodes to see available runmodes." stdout | wc -l + expect: 1