Browse Source

Merge pull request #4733 from fatalbanana/systemd_test

[Test] Test systemd logging
tags/3.8.0
Vsevolod Stakhov 6 months ago
parent
commit
c01a75f186
No account linked to committer's email address

+ 21
- 0
test/functional/cases/410_systemd_logger.robot View File

@@ -0,0 +1,21 @@
*** 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/systemd.conf
${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

+ 4
- 0
test/functional/configs/systemd-local.conf View File

@@ -0,0 +1,4 @@
logging {
type = "console";
systemd = true;
}

+ 3
- 0
test/functional/configs/systemd.conf View File

@@ -0,0 +1,3 @@
.include(duplicate=append,priority=0) "{= env.TESTDIR =}/configs/trivial.conf"

.include(priority=1,duplicate=merge) "{= env.TESTDIR =}/configs/systemd-local.conf"

Loading…
Cancel
Save