aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/180_milter.robot
blob: d41751c7a18b56479728bf10239ace51d8d41b59 (plain)
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
36
37
38
39
40
*** Settings ***
Suite Setup     Rspamd Setup
Suite Teardown  Rspamd Teardown
Test Tags       miltertest
Library         Process
Library         ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource        ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables       ${RSPAMD_TESTDIR}/lib/vars.py

*** Variables ***
${CONFIG}          ${RSPAMD_TESTDIR}/configs/milter.conf
${RSPAMD_SCOPE}    Suite
${RSPAMD_URL_TLD}  ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat

*** Test Cases ***
ACCEPT
  Milter Test  mt1.lua

REJECT
  Milter Test  mt2.lua

REWRITE SUBJECT
  Milter Test  mt3.lua

DEFER
  Milter Test  mt4.lua

COMBINED TEST
  Milter Test  combined.lua

*** Keywords ***
Milter Test
  [Arguments]  ${mtlua}
  Skip If  not ${HAVE_MILTERTEST}  msg=miltertest not installed
  ${result} =  Run Process  miltertest  -Dport\=${RSPAMD_PORT_PROXY}  -Dhost\=${RSPAMD_LOCAL_ADDR}  -s  ${RSPAMD_TESTDIR}/lua/miltertest/${mtlua}
  ...  cwd=${RSPAMD_TESTDIR}/lua/miltertest
  Should Match Regexp  ${result.stderr}  ^$
  Log  ${result.rc}
  Log  ${result.stdout}
  Should Be Equal As Integers  ${result.rc}  0  msg=${result.stdout}  values=false