File: 101_lua.robot

package info (click to toggle)
rspamd 3.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 33,260 kB
  • sloc: ansic: 237,342; cpp: 103,301; javascript: 29,369; asm: 2,512; perl: 2,440; pascal: 1,616; python: 1,224; sql: 313; sh: 281; makefile: 140; xml: 74
file content (35 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
*** Settings ***
Test Teardown   Rspamd Teardown
Library         ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource        ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables       ${RSPAMD_TESTDIR}/lib/vars.py

*** Variables ***
${CONFIG}          ${RSPAMD_TESTDIR}/configs/lua_test.conf
${MESSAGE}         ${RSPAMD_TESTDIR}/messages/spam_message.eml
${RSPAMD_SCOPE}    Test
${RSPAMD_URL_TLD}  ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat

*** Test Cases ***
Flags
  [Setup]  Lua Setup  ${RSPAMD_TESTDIR}/lua/flags.lua
  Scan File  ${MESSAGE}
  ${result} =  Run Rspamc  -h  ${RSPAMD_LOCAL_ADDR}:${RSPAMD_PORT_CONTROLLER}  stat
  Should Contain  ${result.stdout}  Messages scanned: 0

Dependencies
  [Setup]  Lua Setup  ${RSPAMD_TESTDIR}/lua/deps.lua
  Scan File  ${MESSAGE}
  Expect Symbol  DEP10

Pre and Post Filters
  [Setup]  Lua Setup  ${RSPAMD_TESTDIR}/lua/prepostfilters.lua
  Scan File  ${MESSAGE}
  Expect Symbol  TEST_PRE
  Expect Symbol  TEST_POST

*** Keywords ***
Lua Setup
  [Arguments]  ${RSPAMD_LUA_SCRIPT}
  Set Test Variable  ${RSPAMD_LUA_SCRIPT}
  Rspamd Setup