diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-07-18 12:33:52 +0100 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-07-18 16:50:04 +0100 |
commit | e6ff4143d535427e2822ef5ad504f0e36b0047c0 (patch) | |
tree | 4df8597e3efb2ee60e718ffb68ffef5948b1d461 /test | |
parent | a75380749cb238fa71c8a9c9cf4488fe77d0510e (diff) | |
download | rspamd-e6ff4143d535427e2822ef5ad504f0e36b0047c0.tar.gz rspamd-e6ff4143d535427e2822ef5ad504f0e36b0047c0.zip |
[Test] Integrate functional tests with Travis CI
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/cases/statistics/redis-keyed-siphash.robot | 2 | ||||
-rw-r--r-- | test/functional/cases/statistics/redis-keyed-xxhash.robot | 2 | ||||
-rw-r--r-- | test/functional/cases/statistics/redis-plain-siphash.robot | 2 | ||||
-rw-r--r-- | test/functional/cases/statistics/redis-plain-xxhash.robot | 2 | ||||
-rw-r--r-- | test/functional/configs/redis-server.conf | 3 | ||||
-rw-r--r-- | test/functional/lib/rspamd.robot | 4 | ||||
-rw-r--r-- | test/functional/lib/vars.py | 1 |
7 files changed, 11 insertions, 5 deletions
diff --git a/test/functional/cases/statistics/redis-keyed-siphash.robot b/test/functional/cases/statistics/redis-keyed-siphash.robot index f598915cd..ec95efcd1 100644 --- a/test/functional/cases/statistics/redis-keyed-siphash.robot +++ b/test/functional/cases/statistics/redis-keyed-siphash.robot @@ -4,7 +4,7 @@ Suite Teardown Redis Statistics Teardown Resource lib.robot *** Variables *** -${REDIS_SERVER} servers = "${LOCAL_ADDR}:${REDIS_PORT}" +${REDIS_SERVER} servers = "${REDIS_ADDR}:${REDIS_PORT}" ${STATS_BACKEND} redis ${STATS_HASH} hash = "siphash"; ${STATS_KEY} key = "${KEY_PVT1}"; diff --git a/test/functional/cases/statistics/redis-keyed-xxhash.robot b/test/functional/cases/statistics/redis-keyed-xxhash.robot index ca87895c5..5a7b2daf3 100644 --- a/test/functional/cases/statistics/redis-keyed-xxhash.robot +++ b/test/functional/cases/statistics/redis-keyed-xxhash.robot @@ -4,7 +4,7 @@ Suite Teardown Redis Statistics Teardown Resource lib.robot *** Variables *** -${REDIS_SERVER} servers = "${LOCAL_ADDR}:${REDIS_PORT}" +${REDIS_SERVER} servers = "${REDIS_ADDR}:${REDIS_PORT}" ${STATS_BACKEND} redis ${STATS_HASH} hash = "xxhash"; ${STATS_KEY} key = "${KEY_PVT1}"; diff --git a/test/functional/cases/statistics/redis-plain-siphash.robot b/test/functional/cases/statistics/redis-plain-siphash.robot index 2946e8903..d436b1a68 100644 --- a/test/functional/cases/statistics/redis-plain-siphash.robot +++ b/test/functional/cases/statistics/redis-plain-siphash.robot @@ -4,7 +4,7 @@ Suite Teardown Redis Statistics Teardown Resource lib.robot *** Variables *** -${REDIS_SERVER} servers = "${LOCAL_ADDR}:${REDIS_PORT}" +${REDIS_SERVER} servers = "${REDIS_ADDR}:${REDIS_PORT}" ${STATS_BACKEND} redis ${STATS_HASH} hash = "siphash"; diff --git a/test/functional/cases/statistics/redis-plain-xxhash.robot b/test/functional/cases/statistics/redis-plain-xxhash.robot index de69465f0..0c45ac16b 100644 --- a/test/functional/cases/statistics/redis-plain-xxhash.robot +++ b/test/functional/cases/statistics/redis-plain-xxhash.robot @@ -4,7 +4,7 @@ Suite Teardown Redis Statistics Teardown Resource lib.robot *** Variables *** -${REDIS_SERVER} servers = "${LOCAL_ADDR}:${REDIS_PORT}" +${REDIS_SERVER} servers = "${REDIS_ADDR}:${REDIS_PORT}" ${STATS_BACKEND} redis ${STATS_HASH} hash = "xxhash"; diff --git a/test/functional/configs/redis-server.conf b/test/functional/configs/redis-server.conf index 2973ae8d9..e44f8ab02 100644 --- a/test/functional/configs/redis-server.conf +++ b/test/functional/configs/redis-server.conf @@ -1,4 +1,5 @@ -bind ${LOCAL_ADDR} +bind ${REDIS_ADDR} daemonize yes +logfile ${TMPDIR}/redis.log pidfile ${TMPDIR}/redis.pid port ${REDIS_PORT} diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index eb70d4c43..7bba2706c 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -75,11 +75,15 @@ Run Redis ${template} = Get File ${TESTDIR}/configs/redis-server.conf ${config} = Replace Variables ${template} Create File ${TMPDIR}/redis-server.conf ${config} + Log ${config} ${result} = Run Process redis-server ${TMPDIR}/redis-server.conf + Run Keyword If ${result.rc} != 0 Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 ${REDIS_PID} = Get File ${TMPDIR}/redis.pid Run Keyword If '${REDIS_SCOPE}' == 'Test' Set Test Variable ${REDIS_PID} ... ELSE IF '${REDIS_SCOPE}' == 'Suite' Set Suite Variable ${REDIS_PID} + ${redis_log} = Get File ${TMPDIR}/redis.log + Log ${redis_log} Run Rspamc [Arguments] @{args} diff --git a/test/functional/lib/vars.py b/test/functional/lib/vars.py index 316669911..d76d58d84 100644 --- a/test/functional/lib/vars.py +++ b/test/functional/lib/vars.py @@ -4,6 +4,7 @@ LOCAL_ADDR = 'localhost' PORT_CONTROLLER = 56790 PORT_FUZZY = 56791 PORT_NORMAL = 56789 +REDIS_ADDR = '127.0.0.1' REDIS_PORT = 56379 RSPAMD_GROUP = 'nogroup' RSPAMD_USER = 'nobody' |