summaryrefslogtreecommitdiffstats
path: root/test/functional/cases/121_json.robot
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/cases/121_json.robot')
-rw-r--r--test/functional/cases/121_json.robot28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/cases/121_json.robot b/test/functional/cases/121_json.robot
new file mode 100644
index 000000000..2bb432f5a
--- /dev/null
+++ b/test/functional/cases/121_json.robot
@@ -0,0 +1,28 @@
+*** Settings ***
+Suite Setup Generic Setup
+Suite Teardown Generic Teardown
+Library ${TESTDIR}/lib/rspamd.py
+Resource ${TESTDIR}/lib/rspamd.robot
+Variables ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG} ${TESTDIR}/configs/lua_test.conf
+${LUA_SCRIPT} ${TESTDIR}/lua/preresult.lua
+${MESSAGE} ${TESTDIR}/messages/spam_message.eml
+${RSPAMD_SCOPE} Suite
+
+*** Test Cases ***
+Stat
+ @{result} = HTTP GET ${LOCAL_ADDR} ${PORT_CONTROLLER} /stat
+ Check JSON @{result}[1]
+
+History
+ ${result} = Scan Message With Rspamc ${MESSAGE}
+ Check Rspamc ${result} soft reject
+ @{result} = HTTP GET ${LOCAL_ADDR} ${PORT_CONTROLLER} /history
+ Check JSON @{result}[1]
+
+Scan
+ ${content} = Get File ${MESSAGE}
+ @{result} = HTTP POST ${LOCAL_ADDR} ${PORT_NORMAL} /check ${content}
+ Check JSON @{result}[1]