From: Andrew Lewis Date: Mon, 11 Sep 2017 14:54:10 +0000 (+0200) Subject: [Test] Relax controller errors check X-Git-Tag: 1.6.6~2^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=781e7d64078fce7bfe2c7a7c6e204c6da6f0b1d5;p=thirdparty%2Frspamd.git [Test] Relax controller errors check --- diff --git a/test/functional/lib/rspamd.py b/test/functional/lib/rspamd.py index 76af7864dc..3db57a87e0 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 e90ed9ee00..491a60241f 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}