diff options
Diffstat (limited to 'test/functional/cases/121_json/lib.robot')
-rw-r--r-- | test/functional/cases/121_json/lib.robot | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/cases/121_json/lib.robot b/test/functional/cases/121_json/lib.robot new file mode 100644 index 0000000..68bf566 --- /dev/null +++ b/test/functional/cases/121_json/lib.robot @@ -0,0 +1,22 @@ +*** Variables *** +${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat + +*** Keywords *** +Stat Test + @{result} = HTTP GET ${RSPAMD_LOCAL_ADDR} ${RSPAMD_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 ${RSPAMD_LOCAL_ADDR} ${RSPAMD_PORT_CONTROLLER} /history + Check JSON ${result}[1] + Should Be Equal As Integers ${result}[0] 200 + +Scan Test + ${content} = Get File ${MESSAGE} + @{result} = HTTP POST ${RSPAMD_LOCAL_ADDR} ${RSPAMD_PORT_NORMAL} /check ${content} + Check JSON ${result}[1] + Should Be Equal As Integers ${result}[0] 200 |