From d857a8181fdbcd953ee162cd7c8b3967e81e0c0b Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Wed, 16 Aug 2017 22:20:55 +0200 Subject: [PATCH] [Test] Fix tests --- test/functional/cases/115_dmarc.robot | 2 +- .../cases/131_dkim_signing/001_simple.robot | 2 +- .../cases/131_dkim_signing/002_redis.robot | 6 +++--- test/functional/configs/dkim.conf | 4 ++-- test/functional/messages/dmarc/bad_dkim1.eml | 2 +- test/functional/messages/dmarc/bad_dkim3.eml | 2 +- test/functional/messages/dmarc/fail_none.eml | 2 +- test/functional/messages/dmarc/fail_quarantine.eml | 2 +- test/functional/messages/dmarc/fail_reject.eml | 2 +- test/functional/messages/dmarc/pass_none.eml | 13 +++++++------ test/lua/unit/test_tld.dat | 3 ++- 11 files changed, 21 insertions(+), 19 deletions(-) diff --git a/test/functional/cases/115_dmarc.robot b/test/functional/cases/115_dmarc.robot index a2a94c50c..4e504ebd0 100644 --- a/test/functional/cases/115_dmarc.robot +++ b/test/functional/cases/115_dmarc.robot @@ -17,7 +17,7 @@ DMARC NONE PASS DKIM DMARC NONE PASS SPF ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/fail_none.eml - ... -i 212.47.245.199 --from foo@rspamd.tk + ... -i 8.8.4.4 --from foo@spf.cacophony.za.org Check Rspamc ${result} DMARC_POLICY_ALLOW DMARC NONE FAIL diff --git a/test/functional/cases/131_dkim_signing/001_simple.robot b/test/functional/cases/131_dkim_signing/001_simple.robot index c715b4723..66bcffe37 100644 --- a/test/functional/cases/131_dkim_signing/001_simple.robot +++ b/test/functional/cases/131_dkim_signing/001_simple.robot @@ -14,7 +14,7 @@ ${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat *** Test Cases *** TEST SIGNED - ${result} = Scan Message With Rspamc ${MESSAGE} -u bob@rspamd.tk + ${result} = Scan Message With Rspamc ${MESSAGE} -u bob@cacophony.za.org Check Rspamc ${result} DKIM-Signature: Should Contain ${result.stdout} DKIM_SIGNED (1.00) diff --git a/test/functional/cases/131_dkim_signing/002_redis.robot b/test/functional/cases/131_dkim_signing/002_redis.robot index f7d590c1c..891e71385 100644 --- a/test/functional/cases/131_dkim_signing/002_redis.robot +++ b/test/functional/cases/131_dkim_signing/002_redis.robot @@ -14,7 +14,7 @@ ${URL_TLD} ${TESTDIR}/../lua/unit/test_tld.dat *** Test Cases *** TEST SIGNED - ${result} = Scan Message With Rspamc ${MESSAGE} -u bob@rspamd.tk + ${result} = Scan Message With Rspamc ${MESSAGE} -u bob@cacophony.za.org Check Rspamc ${result} DKIM-Signature: Should Contain ${result.stdout} DKIM_SIGNED (1.00) @@ -29,9 +29,9 @@ DKIM Signing Setup Set Suite Variable ${PLUGIN_CONFIG} Generic Setup PLUGIN_CONFIG Run Redis - Redis HSET TEST_DKIM_SELECTORS rspamd.tk test + Redis HSET TEST_DKIM_SELECTORS cacophony.za.org dkim ${key} = Get File ${TESTDIR}/configs/dkim.key - Redis HSET TEST_DKIM_KEYS test.rspamd.tk ${key} + Redis HSET TEST_DKIM_KEYS dkim.cacophony.za.org ${key} DKIM Signing Teardown Normal Teardown diff --git a/test/functional/configs/dkim.conf b/test/functional/configs/dkim.conf index c2ff52275..b10cff0c4 100644 --- a/test/functional/configs/dkim.conf +++ b/test/functional/configs/dkim.conf @@ -46,8 +46,8 @@ return function(task) if not dodkim then return end return { key = "${TESTDIR}/configs/dkim.key", - domain = "rspamd.tk", - selector = "testdkim" + domain = "cacophony.za.org", + selector = "dkim" } end EOD; diff --git a/test/functional/messages/dmarc/bad_dkim1.eml b/test/functional/messages/dmarc/bad_dkim1.eml index 6b3f32ecc..418368655 100644 --- a/test/functional/messages/dmarc/bad_dkim1.eml +++ b/test/functional/messages/dmarc/bad_dkim1.eml @@ -1,6 +1,6 @@ Date: Tue, 09 Aug 2016 10:01:27 +0200 Message-ID: <20160809100127@rspamd.tk> -From: Rspamd +From: Rspamd To: foo@rspamd.tk Subject: hello Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes diff --git a/test/functional/messages/dmarc/bad_dkim3.eml b/test/functional/messages/dmarc/bad_dkim3.eml index 40dc525c9..d178a48d0 100644 --- a/test/functional/messages/dmarc/bad_dkim3.eml +++ b/test/functional/messages/dmarc/bad_dkim3.eml @@ -1,6 +1,6 @@ Date: Tue, 09 Aug 2016 10:01:27 +0200 Message-ID: <20160809100127@rspamd.tk> -From: Rspamd +From: Rspamd To: foo@rspamd.tk Subject: hello Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes diff --git a/test/functional/messages/dmarc/fail_none.eml b/test/functional/messages/dmarc/fail_none.eml index 1dc97c2ea..7fbff7738 100644 --- a/test/functional/messages/dmarc/fail_none.eml +++ b/test/functional/messages/dmarc/fail_none.eml @@ -1,3 +1,3 @@ -From: Rspamd +From: Rspamd hello diff --git a/test/functional/messages/dmarc/fail_quarantine.eml b/test/functional/messages/dmarc/fail_quarantine.eml index 6af9d2186..2d4e46299 100644 --- a/test/functional/messages/dmarc/fail_quarantine.eml +++ b/test/functional/messages/dmarc/fail_quarantine.eml @@ -1,3 +1,3 @@ -From: Rspamd +From: Rspamd hello diff --git a/test/functional/messages/dmarc/fail_reject.eml b/test/functional/messages/dmarc/fail_reject.eml index 014d20c06..e21248cf0 100644 --- a/test/functional/messages/dmarc/fail_reject.eml +++ b/test/functional/messages/dmarc/fail_reject.eml @@ -1,3 +1,3 @@ -From: Rspamd +From: Rspamd hello diff --git a/test/functional/messages/dmarc/pass_none.eml b/test/functional/messages/dmarc/pass_none.eml index e29e6a5de..f7fa38083 100644 --- a/test/functional/messages/dmarc/pass_none.eml +++ b/test/functional/messages/dmarc/pass_none.eml @@ -1,16 +1,17 @@ Date: Tue, 09 Aug 2016 10:01:27 +0200 Message-ID: <20160809100127@rspamd.tk> -From: Rspamd +From: Rspamd To: foo@rspamd.tk Subject: hello Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rspamd.tk; s=testdkim; - t=1470729879; h=from:subject:date:message-id:to:mime-version:content-type; - bh=7HkRgYnNru3SR2EWfgWU8yhM0MOH6ZZrPoEIgNIh8wc=; - b=kTIV4jcgv9sWFh2JFrS/+PcNxiloituqjmHHqeJOTfa+/9C+Er8BjnMysTJyYVq36Gnv0OZDgLr3Yy4YP5Lzbt1M9ZdN5cJqO7yn1N7wyaGfkt++b09rIYBy5Dkk7OWyP3cDThqDzv8C9heSvqBSEsirFsbt3Wx2g/hWiJlnjew= - +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cacophony.za.org; + s=dkim; t=1502912195; h=from:subject:date:message-id:to:mime-version:content-type; + bh=zS7KNTV0HyeorkDDGwxB1AV6enuRKzO5rthkhdHIRnY=; + b=GEGigFZw2oSlVM+lZcMsnq6XHsoIQ3HsehPjbfn9nZjpLpuZ5Yzc/Oki8eiyDg+Dw+203N + lRott5+RToquJiGTM0uhxG7bcLu72HmT/JvGO/kNSML9w4GuzBp8OinZLhZqmaxz4RlkLx + 41feLYvmQnWWfNhssQNp/5ifi4+AXxM= hello diff --git a/test/lua/unit/test_tld.dat b/test/lua/unit/test_tld.dat index fbdaa71e7..95fbae5a8 100644 --- a/test/lua/unit/test_tld.dat +++ b/test/lua/unit/test_tld.dat @@ -1,4 +1,5 @@ com org net -рф \ No newline at end of file +рф +za.org -- 2.39.5