diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-06-30 13:55:18 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-06-30 14:02:40 +0200 |
commit | fc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976 (patch) | |
tree | b0993673ef68eaf7065b8855b05721717b13aa3e /test | |
parent | 9be11035d0ce5e64627fb8f7cf577d35cc46f6cf (diff) | |
download | rspamd-fc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976.tar.gz rspamd-fc6155ae6b86ac4a7ec8dfa752e6b7f195f2d976.zip |
[Minor] Tests: don't try bind ports
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/cases/102_multimap.robot | 1 | ||||
-rw-r--r-- | test/functional/cases/106_url_tags.robot | 1 | ||||
-rw-r--r-- | test/functional/cases/110_statistics/lib.robot | 1 | ||||
-rw-r--r-- | test/functional/cases/120_fuzzy/redis-general.robot | 1 | ||||
-rw-r--r-- | test/functional/cases/120_fuzzy/replication.robot | 9 | ||||
-rw-r--r-- | test/functional/cases/131_dkim_signing/002_redis.robot | 1 | ||||
-rw-r--r-- | test/functional/cases/140_proxy.robot | 5 | ||||
-rw-r--r-- | test/functional/cases/160_antivirus.robot | 3 | ||||
-rw-r--r-- | test/functional/lib/rspamd.py | 20 | ||||
-rw-r--r-- | test/functional/lib/rspamd.robot | 2 |
10 files changed, 0 insertions, 44 deletions
diff --git a/test/functional/cases/102_multimap.robot b/test/functional/cases/102_multimap.robot index 7b45bdcac..977a84991 100644 --- a/test/functional/cases/102_multimap.robot +++ b/test/functional/cases/102_multimap.robot @@ -281,4 +281,3 @@ Multimap Setup Multimap Teardown Normal Teardown Shutdown Process With Children ${REDIS_PID} - Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${REDIS_PORT} diff --git a/test/functional/cases/106_url_tags.robot b/test/functional/cases/106_url_tags.robot index 960376ab7..7954d0aac 100644 --- a/test/functional/cases/106_url_tags.robot +++ b/test/functional/cases/106_url_tags.robot @@ -39,4 +39,3 @@ URL Tags Teardown Normal Teardown Remove File ${LUA} Shutdown Process With Children ${REDIS_PID} - Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${REDIS_PORT} diff --git a/test/functional/cases/110_statistics/lib.robot b/test/functional/cases/110_statistics/lib.robot index 7aba131d9..268433d04 100644 --- a/test/functional/cases/110_statistics/lib.robot +++ b/test/functional/cases/110_statistics/lib.robot @@ -51,7 +51,6 @@ Redis Statistics Setup Redis Statistics Teardown Normal Teardown Shutdown Process With Children ${REDIS_PID} - Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${REDIS_PORT} Statistics Setup Generic Setup STATS_PATH_CACHE STATS_PATH_HAM STATS_PATH_SPAM diff --git a/test/functional/cases/120_fuzzy/redis-general.robot b/test/functional/cases/120_fuzzy/redis-general.robot index d79ab30e7..056b177c8 100644 --- a/test/functional/cases/120_fuzzy/redis-general.robot +++ b/test/functional/cases/120_fuzzy/redis-general.robot @@ -29,4 +29,3 @@ Fuzzy Redis General Setup Fuzzy Redis General Teardown Normal Teardown Shutdown Process With Children ${REDIS_PID} - Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${REDIS_PORT} diff --git a/test/functional/cases/120_fuzzy/replication.robot b/test/functional/cases/120_fuzzy/replication.robot index 8a3b875ed..cb7d42533 100644 --- a/test/functional/cases/120_fuzzy/replication.robot +++ b/test/functional/cases/120_fuzzy/replication.robot @@ -82,12 +82,3 @@ Replication Teardown Cleanup Temporary Directory ${SLAVE_TMPDIR} Remove File ${TMP_INCLUDE1} Remove File ${TMP_INCLUDE2} - ${port_normal} = Create List ${SOCK_STREAM} ${LOCAL_ADDR} ${PORT_NORMAL} - ${port_fuzzy} = Create List ${SOCK_DGRAM} ${LOCAL_ADDR} ${PORT_FUZZY} - ${port_controller} = Create List ${SOCK_STREAM} ${LOCAL_ADDR} ${PORT_CONTROLLER} - ${port_normal_slave} = Create List ${SOCK_STREAM} ${LOCAL_ADDR} ${PORT_NORMAL_SLAVE} - ${port_fuzzy_slave} = Create List ${SOCK_DGRAM} ${LOCAL_ADDR} ${PORT_FUZZY_SLAVE} - ${port_controller_slave} = Create List ${SOCK_STREAM} ${LOCAL_ADDR} ${PORT_CONTROLLER_SLAVE} - ${ports} = Create List ${port_normal} ${port_fuzzy} ${port_controller} ${port_normal_slave} ${port_fuzzy_slave} ${port_controller_slave} - : FOR ${i} IN @{ports} - \ Wait For Port @{i}[0] @{i}[1] @{i}[2] diff --git a/test/functional/cases/131_dkim_signing/002_redis.robot b/test/functional/cases/131_dkim_signing/002_redis.robot index f46bfbc33..f7d590c1c 100644 --- a/test/functional/cases/131_dkim_signing/002_redis.robot +++ b/test/functional/cases/131_dkim_signing/002_redis.robot @@ -36,4 +36,3 @@ DKIM Signing Setup DKIM Signing Teardown Normal Teardown Shutdown Process With Children ${REDIS_PID} - Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${REDIS_PORT} diff --git a/test/functional/cases/140_proxy.robot b/test/functional/cases/140_proxy.robot index 42297ea62..7b29f188a 100644 --- a/test/functional/cases/140_proxy.robot +++ b/test/functional/cases/140_proxy.robot @@ -47,8 +47,3 @@ Proxy Teardown Shutdown Process With Children ${SLAVE_PID} Cleanup Temporary Directory ${PROXY_TMPDIR} Cleanup Temporary Directory ${SLAVE_TMPDIR} - ${port_normal} = Create List ${SOCK_STREAM} ${LOCAL_ADDR} ${PORT_NORMAL} - ${port_proxy} = Create List ${SOCK_STREAM} ${LOCAL_ADDR} ${PORT_PROXY} - ${ports} = Create List ${port_normal} ${port_proxy} - : FOR ${i} IN @{ports} - \ Wait For Port @{i}[0] @{i}[1] @{i}[2] diff --git a/test/functional/cases/160_antivirus.robot b/test/functional/cases/160_antivirus.robot index 98c7a4a2a..ec43329e3 100644 --- a/test/functional/cases/160_antivirus.robot +++ b/test/functional/cases/160_antivirus.robot @@ -67,16 +67,13 @@ Antivirus Setup Antivirus Teardown Normal Teardown Shutdown Process With Children ${REDIS_PID} - Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${REDIS_PORT} Run Dummy Clam [Arguments] ${port} ${found}= - Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${port} ${result} = Start Process ${TESTDIR}/util/dummy_clam.py ${port} ${found} Wait Until Created /tmp/dummy_clamav.pid Run Dummy Fprot [Arguments] ${port} ${found}= - Wait For Port ${SOCK_STREAM} ${LOCAL_ADDR} ${port} ${result} = Start Process ${TESTDIR}/util/dummy_fprot.py ${port} ${found} Wait Until Created /tmp/dummy_fprot.pid diff --git a/test/functional/lib/rspamd.py b/test/functional/lib/rspamd.py index fd1907384..76af7864d 100644 --- a/test/functional/lib/rspamd.py +++ b/test/functional/lib/rspamd.py @@ -1,6 +1,5 @@ import demjson import grp -import ipaddress import os import os.path import psutil @@ -200,22 +199,3 @@ def shutdown_process_with_children(pid): shutdown_process(child.pid) except: pass - -def wait_for_port(proto, addr, num): - i = ipaddress.ip_address(addr) - if (i.version == 6): - af = socket.AF_INET6 - else: - af = socket.AF_INET - while True: - try: - s = socket.socket(af, proto) - s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - s.bind((addr, num)) - if (proto == socket.SOCK_STREAM): - s.listen(0) - break - except: - pass - time.sleep(0.01) - s.close() diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index 3044b8292..e90ed9ee0 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -71,8 +71,6 @@ Generic Teardown Run Keyword If '${CONTROLLER_ERRORS}' == 'True' Check Controller Errors Shutdown Process With Children ${RSPAMD_PID} Cleanup Temporary Directory ${TMPDIR} - : FOR ${i} IN @{ports} - \ Wait For Port @{i}[0] @{i}[1] @{i}[2] Log Logs [Arguments] ${logfile} ${position} |