diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-09-11 16:54:10 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-09-13 22:17:44 +0200 |
commit | fea677fcbfc963a92c2bb933acd79974d146808d (patch) | |
tree | 184437b0d7b070044527f0806924981cd8f3c036 | |
parent | 80afa065248900cea84e7b823a133380b2991ce8 (diff) | |
download | rspamd-fea677fcbfc963a92c2bb933acd79974d146808d.tar.gz rspamd-fea677fcbfc963a92c2bb933acd79974d146808d.zip |
[Test] Relax controller errors check
-rw-r--r-- | test/functional/lib/rspamd.py | 23 | ||||
-rw-r--r-- | test/functional/lib/rspamd.robot | 2 |
2 files changed, 1 insertions, 24 deletions
diff --git a/test/functional/lib/rspamd.py b/test/functional/lib/rspamd.py index 76af7864d..3db57a87e 100644 --- a/test/functional/lib/rspamd.py +++ b/test/functional/lib/rspamd.py @@ -24,29 +24,6 @@ try: except: import httplib -ignore_message = [ - re.compile("^cannot load controller stats from .*/stats\\.ucl: No such file or directory$"), - re.compile("^regexp module enabled, but no rules are defined$"), - re.compile("^cannot find dependency on symbol FREEMAIL_FROM$"), - re.compile("^cannot find dependency on symbol FREEMAIL_REPLYTO$"), - re.compile("^cannot register delayed condition for DMARC_POLICY_ALLOW$"), - re.compile("^failed to scan: Socket error detected: Connection refused$"), -] - -def Check_Errors_JSON(j): - d = demjson.decode(j, strict=True) - assert type(d) is list, j - e = [] - for c in d: - filtered = False - for r in ignore_message: - if r.match(c['message']): - filtered = True - break - if not filtered: - e.append(c) - assert len(e) == 0, str(e) - def Check_JSON(j): d = demjson.decode(j, strict=True) assert len(d) > 0 diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index e90ed9ee0..491a60241 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -6,8 +6,8 @@ Library Process *** Keywords *** Check Controller Errors @{result} = HTTP GET ${LOCAL_ADDR} ${PORT_CONTROLLER} /errors - Check Errors JSON @{result}[1] Should Be Equal As Integers @{result}[0] 200 + Log @{result}[1] Check Pidfile [Arguments] ${pidfile} |