From fb1df8484e1a336117f5c4ebfed7a1254300094f Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Thu, 18 Aug 2016 11:23:30 +0200 Subject: [Feature] Add mempool maps in multimap --- test/functional/cases/102_multimap.robot | 11 ++++++++++- test/functional/configs/multimap.conf | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/cases/102_multimap.robot b/test/functional/cases/102_multimap.robot index de3595378..abe79f512 100644 --- a/test/functional/cases/102_multimap.robot +++ b/test/functional/cases/102_multimap.robot @@ -224,10 +224,19 @@ MAP - REDIS - CC - HIT ${result} = Scan Message With Rspamc ${MESSAGE} -i 8.8.8.8 Check Rspamc ${result} REDIS_COUNTRY -MAP - REDIS - ASN - MISS +MAP - REDIS - CC - MISS ${result} = Scan Message With Rspamc ${MESSAGE} -i 46.228.47.114 Check Rspamc ${result} REDIS_COUNTRY inverse=1 +MAP - REDIS - ASN FILTERED - HIT + Redis HSET asn 1 ${EMPTY} + ${result} = Scan Message With Rspamc ${MESSAGE} -i 8.8.8.8 + Check Rspamc ${result} REDIS_ASN_FILTERED + +MAP - REDIS - ASN FILTERED - MISS + ${result} = Scan Message With Rspamc ${MESSAGE} -i 46.228.47.114 + Check Rspamc ${result} REDIS_ASN_FILTERED 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 3823914cf..fc20fa14c 100644 --- a/test/functional/configs/multimap.conf +++ b/test/functional/configs/multimap.conf @@ -106,4 +106,10 @@ multimap { type = "asn"; map = "redis://asn"; } + REDIS_ASN_FILTERED { + type = "mempool"; + variable = "asn"; + map = "redis://asn"; + filter = "regexp:/^(\d).*/"; + } } -- cgit v1.2.3