diff options
Diffstat (limited to 'test/functional/lib')
-rw-r--r-- | test/functional/lib/rspamd.robot | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index 5d23e3ceb..f61998f46 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -419,10 +419,23 @@ Run Nginx ${nginx_log} = Get File ${RSPAMD_TMPDIR}/nginx.log Log ${nginx_log} +Set Test Hash Documentation + ${log_tag} = Evaluate __import__('hashlib').md5('${TEST NAME}'.encode()).hexdigest()[:8] + Log TEST CONTEXT: [${log_tag}] ${TEST NAME} console=True + Run Rspamc [Arguments] @{args} - ${result} = Run Process ${RSPAMC} -t 60 --header Queue-ID\=${TEST NAME} - ... @{args} env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick + ${log_tag} = Evaluate __import__('hashlib').md5('${TEST NAME}'.encode()).hexdigest()[:8] + # Check if --queue-id is already provided in the arguments + ${args_str} = Evaluate ' '.join(@{args}) + ${has_queue_id} = Evaluate '--queue-id' in '${args_str}' + IF ${has_queue_id} + ${result} = Run Process ${RSPAMC} -t 60 --log-tag ${log_tag} + ... @{args} env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick + ELSE + ${result} = Run Process ${RSPAMC} -t 60 --queue-id ${TEST NAME} --log-tag ${log_tag} + ... @{args} env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick + END Log ${result.stdout} [Return] ${result} |