diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-08-17 11:33:06 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-08-17 11:33:06 +0200 |
commit | 643ca8d0dab13ff0502a85aae859c1733030bd7b (patch) | |
tree | c9e2fcf034e322e38f07c6c03f3007c7fa6c47c7 /test/functional | |
parent | 95492aa853706b30d32c04bdbf6fc79b90de41e4 (diff) | |
download | rspamd-643ca8d0dab13ff0502a85aae859c1733030bd7b.tar.gz rspamd-643ca8d0dab13ff0502a85aae859c1733030bd7b.zip |
[Feature] ASN module; support matching ASN/country in multimap
- Also removed stuff from ip_score
- Updated tests
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/cases/102_multimap.robot | 18 | ||||
-rw-r--r-- | test/functional/configs/multimap.conf | 10 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/cases/102_multimap.robot b/test/functional/cases/102_multimap.robot index 364787b15..de3595378 100644 --- a/test/functional/cases/102_multimap.robot +++ b/test/functional/cases/102_multimap.robot @@ -210,6 +210,24 @@ MAP - REDIS - URL NOFILTER - MISS ${result} = Scan Message With Rspamc ${URL4} Check Rspamc ${result} REDIS_URL_NOFILTER inverse=1 +MAP - REDIS - ASN - HIT + Redis HSET asn 15169 ${EMPTY} + ${result} = Scan Message With Rspamc ${MESSAGE} -i 8.8.8.8 + Check Rspamc ${result} REDIS_ASN + +MAP - REDIS - ASN - MISS + ${result} = Scan Message With Rspamc ${MESSAGE} -i 46.228.47.114 + Check Rspamc ${result} REDIS_ASN inverse=1 + +MAP - REDIS - CC - HIT + Redis HSET cc US ${EMPTY} + ${result} = Scan Message With Rspamc ${MESSAGE} -i 8.8.8.8 + Check Rspamc ${result} REDIS_COUNTRY + +MAP - REDIS - ASN - MISS + ${result} = Scan Message With Rspamc ${MESSAGE} -i 46.228.47.114 + Check Rspamc ${result} REDIS_COUNTRY inverse=1 + *** Keywords *** Multimap Setup ${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/multimap.conf diff --git a/test/functional/configs/multimap.conf b/test/functional/configs/multimap.conf index 96258c15a..3823914cf 100644 --- a/test/functional/configs/multimap.conf +++ b/test/functional/configs/multimap.conf @@ -1,3 +1,5 @@ +asn { +} redis { servers = "${REDIS_ADDR}:${REDIS_PORT}"; } @@ -96,4 +98,12 @@ multimap { type = "url"; map = "redis://urlnofilter"; } + REDIS_COUNTRY { + type = "country"; + map = "redis://cc"; + } + REDIS_ASN { + type = "asn"; + map = "redis://asn"; + } } |