diff options
Diffstat (limited to 'test/functional/cases/001_merged/310_udp.robot')
-rw-r--r-- | test/functional/cases/001_merged/310_udp.robot | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/functional/cases/001_merged/310_udp.robot b/test/functional/cases/001_merged/310_udp.robot new file mode 100644 index 0000000..e94ed60 --- /dev/null +++ b/test/functional/cases/001_merged/310_udp.robot @@ -0,0 +1,40 @@ +*** Settings *** +Test Setup UDP Setup +Test Teardown UDP Teardown +Library Process +Library ${RSPAMD_TESTDIR}/lib/rspamd.py +Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot +Variables ${RSPAMD_TESTDIR}/lib/vars.py + +*** Variables *** +${MESSAGE} ${RSPAMD_TESTDIR}/messages/spam_message.eml +${SETTINGS_UDP} {symbols_enabled = [UDP_FAIL,UDP_SENDTO,UDP_SUCCESS]} + +*** Test Cases *** +Simple UDP request + Scan File ${MESSAGE} + ... Settings=${SETTINGS_UDP} + Expect Symbol With Exact Options UDP_SUCCESS helloworld + +Sendonly UDP request + Scan File ${MESSAGE} + ... Settings=${SETTINGS_UDP} + Expect Symbol UDP_SENDTO + +Errored UDP request + Scan File ${MESSAGE} + ... Settings=${SETTINGS_UDP} + Expect Symbol With Exact Options UDP_FAIL read timeout + +*** Keywords *** +UDP Setup + Run Dummy UDP + +UDP Teardown + ${udp_pid} = Get File /tmp/dummy_udp.pid + Shutdown Process With Children ${udp_pid} + +Run Dummy UDP + [Arguments] + ${result} = Start Process ${RSPAMD_TESTDIR}/util/dummy_udp.py 5005 + Wait Until Created /tmp/dummy_udp.pid |