diff options
Diffstat (limited to 'test/functional/cases/411_logging')
3 files changed, 65 insertions, 0 deletions
diff --git a/test/functional/cases/411_logging/000_console/000_systemd_logger.robot b/test/functional/cases/411_logging/000_console/000_systemd_logger.robot new file mode 100644 index 000000000..88178461b --- /dev/null +++ b/test/functional/cases/411_logging/000_console/000_systemd_logger.robot @@ -0,0 +1,24 @@ +*** Settings *** +Suite Setup Rspamd Setup +Suite Teardown Systemd Teardown +Library ${RSPAMD_TESTDIR}/lib/rspamd.py +Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot +Variables ${RSPAMD_TESTDIR}/lib/vars.py + +*** Variables *** +${CONFIG} ${RSPAMD_TESTDIR}/configs/loggingtest.conf +${RSPAMD_LOGGINGTYPE} console +${RSPAMD_JSON} false +${RSPAMD_SYSTEMD} true +${RSPAMD_SCOPE} Suite + +*** Test Cases *** +EMPTY TEST + Pass Execution No worries + +*** Keywords *** +Systemd Teardown + Touch ${RSPAMD_TMPDIR}/rspamd.log + Rspamd Teardown + ${log} = Get File ${EXECDIR}/robot-save/rspamd.stderr.last + Should Match Regexp ${log} \\n\\(main\\) lua; lua_cfg_transform\\.lua:\\d+: overriding actions from the legacy metric settings\\n diff --git a/test/functional/cases/411_logging/000_console/001_timestamps.robot b/test/functional/cases/411_logging/000_console/001_timestamps.robot new file mode 100644 index 000000000..bd8e2c349 --- /dev/null +++ b/test/functional/cases/411_logging/000_console/001_timestamps.robot @@ -0,0 +1,24 @@ +*** Settings *** +Suite Setup Rspamd Setup +Suite Teardown Console Timestamps Teardown +Library ${RSPAMD_TESTDIR}/lib/rspamd.py +Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot +Variables ${RSPAMD_TESTDIR}/lib/vars.py + +*** Variables *** +${CONFIG} ${RSPAMD_TESTDIR}/configs/loggingtest.conf +${RSPAMD_LOGGINGTYPE} console +${RSPAMD_JSON} false +${RSPAMD_SYSTEMD} false +${RSPAMD_SCOPE} Suite + +*** Test Cases *** +EMPTY TEST + Pass Execution No worries + +*** Keywords *** +Console Timestamps Teardown + Touch ${RSPAMD_TMPDIR}/rspamd.log + Rspamd Teardown + ${log} = Get File ${EXECDIR}/robot-save/rspamd.stderr.last + Should Match Regexp ${log} \\n\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2} #\\d+\\(main\\) lua; lua_cfg_transform\\.lua:\\d+: overriding actions from the legacy metric settings\\n diff --git a/test/functional/cases/411_logging/001_file/000_json.robot b/test/functional/cases/411_logging/001_file/000_json.robot new file mode 100644 index 000000000..a2f04e85c --- /dev/null +++ b/test/functional/cases/411_logging/001_file/000_json.robot @@ -0,0 +1,17 @@ +*** Settings *** +Test Setup Rspamd Setup +Library ${RSPAMD_TESTDIR}/lib/rspamd.py +Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot +Variables ${RSPAMD_TESTDIR}/lib/vars.py + +*** Variables *** +${CONFIG} ${RSPAMD_TESTDIR}/configs/loggingtest.conf +${RSPAMD_LOGGINGTYPE} file +${RSPAMD_JSON} true +${RSPAMD_SYSTEMD} true +${RSPAMD_SCOPE} Test + +*** Test Cases *** +JSON LOGS + Rspamd Teardown + Check JSON Log ${EXECDIR}/robot-save/rspamd.log.last |