Debian Codegraph @

test/functional/cases/360_force_actions.robot

raw
1 *** Settings ***
2 Suite Setup Rspamd Setup
3 Suite Teardown Rspamd Teardown
4 Library ${RSPAMD_TESTDIR}/lib/rspamd.py
5 Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
6 Variables ${RSPAMD_TESTDIR}/lib/vars.py
7
8 *** Variables ***
9 ${CONFIG} ${RSPAMD_TESTDIR}/configs/force_actions.conf
10 ${MESSAGE} ${RSPAMD_TESTDIR}/messages/url7.eml
11 ${RSPAMD_SCOPE} Suite
12 ${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
13
14 *** Test Cases ***
15 FORCE ACTIONS from reject to add header
16 Scan File ${MESSAGE} Settings-Id=id_reject
17 Expect Action add header
18 Expect Symbol FORCE_ACTION_FORCE_REJECT_TO_ADD_HEADER
19
20 FORCE ACTIONS from reject to no action
21 Scan File ${MESSAGE} Settings-Id=id_reject_no_action
22 Expect Action no action
23 Expect Symbol FORCE_ACTION_FORCE_REJECT_TO_NO_ACTION
24
25 FORCE ACTIONS from no action to reject
26 Scan File ${MESSAGE} Settings-Id=id_no_action
27 Expect Action reject
28 Expect Symbol FORCE_ACTION_FORCE_NO_ACTION_TO_REJECT
29
30 FORCE ACTIONS from no action to add header
31 Scan File ${MESSAGE} Settings-Id=id_no_action_to_add_header
32 Expect Action add header
33 Expect Symbol FORCE_ACTION_FORCE_NO_ACTION_TO_ADD_HEADER
34
35 FORCE ACTIONS from add header to no action
36 Scan File ${MESSAGE} Settings-Id=id_add_header
37 Expect Action no action
38 Expect Symbol FORCE_ACTION_FORCE_ADD_HEADER_TO_NO_ACTION
39
40 FORCE ACTIONS from add header to reject
41 Scan File ${MESSAGE} Settings-Id=id_add_header_to_reject
42 Expect Action reject
43 Expect Symbol FORCE_ACTION_FORCE_ADD_HEADER_TO_REJECT
44