summaryrefslogtreecommitdiffstats
path: root/test/functional/cases/241_redis_is_dead.robot
blob: ac8924bc8466432e8a899952fca9b8d6c6a90a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
*** Settings ***
Documentation    Test the case when trying to connect to nowhere
...              (i.e. redis is not running)
Test Setup      New Setup
Test Teardown   Normal Teardown
Library         Process
Library         ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource        ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables       ${RSPAMD_TESTDIR}/lib/vars.py
Suite Teardown  Terminate All Processes    kill=True


*** Variables ***
${REDIS_SCOPE}  Test
${RSPAMD_SCOPE}  Test
${CONFIG}       ${RSPAMD_TESTDIR}/configs/redis.conf
${RSPAMD_LUA_SCRIPT}  ${RSPAMD_TESTDIR}/lua/redis.lua
${RSPAMD_URL_TLD}      ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat
${MESSAGE}      ${RSPAMD_TESTDIR}/messages/spam_message.eml


*** Test Cases ***
Dead Redis client
  Scan File  ${MESSAGE}
  Expect Symbol With Exact Options  REDIS_ERROR_3  Connection refused
  Expect Symbol With Exact Options  REDIS_ASYNC201809_ERROR  Connection refused
  Expect Symbol With Exact Options  REDIS_ASYNC_ERROR  Connection refused