From fea677fcbfc963a92c2bb933acd79974d146808d Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Mon, 11 Sep 2017 16:54:10 +0200 Subject: [PATCH] [Test] Relax controller errors check --- test/functional/lib/rspamd.py | 23 ----------------------- test/functional/lib/rspamd.robot | 2 +- 2 files changed, 1 insertion(+), 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} -- 2.39.5