aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/121_json/lib.robot
blob: 4d87485dc72b91ed2d5a6876f2e1e3ea76abfe78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
*** Variables ***
${URL_TLD}      ${TESTDIR}/../lua/unit/test_tld.dat

*** Keywords ***
Stat Test
  @{result} =  HTTP  GET  ${LOCAL_ADDR}  ${PORT_CONTROLLER}  /stat
  Check JSON  ${result}[1]
  Should Be Equal As Integers  ${result}[0]  200

History Test
  [Arguments]  ${rspamc_expected_result}
  ${result} =  Scan Message With Rspamc  ${MESSAGE}
  Check Rspamc  ${result}  ${rspamc_expected_result}
  @{result} =  HTTP  GET  ${LOCAL_ADDR}  ${PORT_CONTROLLER}  /history
  Check JSON  ${result}[1]
  Should Be Equal As Integers  ${result}[0]  200

Scan Test
  ${content} =  Get File  ${MESSAGE}
  @{result} =  HTTP  POST  ${LOCAL_ADDR}  ${PORT_NORMAL}  /check  ${content}
  Check JSON  ${result}[1]
  Should Be Equal As Integers  ${result}[0]  200