*** Test Cases ***
Scan Message
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_PROXY} -p ${MESSAGE}
- ${PROXY_LOGPOS} = Log Logs ${PROXY_TMPDIR}/rspamd.log ${PROXY_LOGPOS}
- Set Suite Variable ${PROXY_LOGPOS}
- ${SLAVE_LOGPOS} = Log Logs ${SLAVE_TMPDIR}/rspamd.log ${SLAVE_LOGPOS}
- Set Suite Variable ${SLAVE_LOGPOS}
+ Custom Follow Rspamd Log ${PROXY_TMPDIR}/rspamd.log ${PROXY_LOGPOS} PROXY_LOGPOS Suite
+ Custom Follow Rspamd Log ${SLAVE_TMPDIR}/rspamd.log ${SLAVE_LOGPOS} SLAVE_LOGPOS Suite
Run Keyword If ${result.rc} != 0 Log ${result.stderr}
Should Contain ${result.stdout} SIMPLE_TEST
Should Be Equal As Integers ${result.rc} 0
Run Keyword If ${inverse} == False Should Contain ${subject} ${str}
... ELSE Should Not Contain ${subject} ${str}
+Custom Follow Rspamd Log
+ [Arguments] ${logfile} ${logpos} ${logpos_var} ${scope}
+ ${logpos} = Log Logs ${logfile} ${logpos}
+ Run Keyword If '${scope}' == 'Test' Set Test Variable ${${logpos_var}} ${logpos}
+ ... ELSE IF '${scope}' == 'Suite' Set Suite Variable ${${logpos_var}} ${logpos}
+ ... ELSE Fail 'scope must be Test or Suite'
+
Follow Rspamd Log
${RSPAMD_LOGPOS} = Log Logs ${TMPDIR}/rspamd.log ${RSPAMD_LOGPOS}
Run Keyword If '${RSPAMD_SCOPE}' == 'Test' Set Test Variable ${RSPAMD_LOGPOS}