diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-10-13 14:14:51 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-10-13 19:19:24 +0200 |
commit | f738c01a45570cc5a82d7501b3b2974f67858007 (patch) | |
tree | 57833e87f2df829c80f0e0f6482082f454ee7df2 /test/functional/lib | |
parent | f62f3e497c91eda02402966a990ec14ab60af66a (diff) | |
download | rspamd-f738c01a45570cc5a82d7501b3b2974f67858007.tar.gz rspamd-f738c01a45570cc5a82d7501b3b2974f67858007.zip |
[Test] Test fuzzy replication
Diffstat (limited to 'test/functional/lib')
-rw-r--r-- | test/functional/lib/rspamd.py | 3 | ||||
-rw-r--r-- | test/functional/lib/rspamd.robot | 8 | ||||
-rw-r--r-- | test/functional/lib/vars.py | 3 |
3 files changed, 12 insertions, 2 deletions
diff --git a/test/functional/lib/rspamd.py b/test/functional/lib/rspamd.py index 31e79b095..89e79aec8 100644 --- a/test/functional/lib/rspamd.py +++ b/test/functional/lib/rspamd.py @@ -72,6 +72,9 @@ def HTTP(method, host, port, path, data=None, headers={}): def make_temporary_directory(): return tempfile.mkdtemp() +def make_temporary_file(): + return tempfile.mktemp() + def path_splitter(path): dirname = os.path.dirname(path) basename = os.path.basename(path) diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index 438aeb1bc..004df3f4b 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -124,7 +124,11 @@ Scan Message With Rspamc [Return] ${result} Sync Fuzzy Storage - ${result} = Run Process ${RSPAMADM} control -s ${TMPDIR}/rspamd.sock fuzzy_sync + [Arguments] @{vargs} + ${len} = Get Length ${vargs} + ${result} = Run Keyword If $len == 0 Run Process ${RSPAMADM} control -s ${TMPDIR}/rspamd.sock fuzzy_sync + ... ELSE Run Process ${RSPAMADM} control -s @{vargs}[0]/rspamd.sock fuzzy_sync Log ${result.stdout} - Follow Rspamd Log + Run Keyword If $len == 0 Follow Rspamd Log + ... ELSE Custom Follow Rspamd Log @{vargs}[0]/rspamd.log @{vargs}[1] @{vargs}[2] @{vargs}[3] Sleep 0.005s Try give fuzzy storage time to sync diff --git a/test/functional/lib/vars.py b/test/functional/lib/vars.py index f260dc1b4..917bde842 100644 --- a/test/functional/lib/vars.py +++ b/test/functional/lib/vars.py @@ -2,8 +2,11 @@ KEY_PVT1 = 'ekd3x36tfa5gd76t6pa8hqif3ott7n1siuux68exbkk7ukscte9y' KEY_PUB1 = 'm8kneubpcjsb8sbsoj7jy7azj9fdd3xmj63txni86a8ye9ncomny' LOCAL_ADDR = '127.0.0.1' PORT_CONTROLLER = 56790 +PORT_CONTROLLER_SLAVE = 56793 PORT_FUZZY = 56791 +PORT_FUZZY_SLAVE = 56792 PORT_NORMAL = 56789 +PORT_NORMAL_SLAVE = 56794 PORT_PROXY = 56795 REDIS_ADDR = '127.0.0.1' REDIS_PORT = 56379 |