From: Andrew Lewis Date: Thu, 4 Aug 2016 09:48:48 +0000 (+0100) Subject: [Test] Add test for CDB maps X-Git-Tag: 1.3.2~52^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F805%2Fhead;p=thirdparty%2Frspamd.git [Test] Add test for CDB maps --- diff --git a/test/functional/cases/102_maps.robot b/test/functional/cases/102_maps.robot index 6070cf5e44..1c7bcb3bcc 100644 --- a/test/functional/cases/102_maps.robot +++ b/test/functional/cases/102_maps.robot @@ -105,3 +105,11 @@ MAP - HOSTNAME MAP - HOSTNAME MISS ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname rspamd.com Check Rspamc ${result} HOSTNAME_MAP inverse=1 rc_noinverse=1 + +MAP - CDB - HOSTNAME + ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname example.com + Check Rspamc ${result} HOSTNAME_MAP + +MAP - CDB - HOSTNAME MISS + ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname rspamd.com + Check Rspamc ${result} HOSTNAME_MAP inverse=1 rc_noinverse=1 diff --git a/test/functional/configs/maps.conf b/test/functional/configs/maps.conf index 039ef3fb00..09a8e8cd78 100644 --- a/test/functional/configs/maps.conf +++ b/test/functional/configs/maps.conf @@ -73,4 +73,8 @@ multimap { type = "hostname"; map = "${TESTDIR}/configs/maps/domains.list"; } + HOSTNAME_MAP_CDB { + type = "hostname"; + map = "cdb://${TESTDIR}/configs/maps/domains.cdb"; + } } diff --git a/test/functional/configs/maps/domains.cdb b/test/functional/configs/maps/domains.cdb new file mode 100644 index 0000000000..889268e206 Binary files /dev/null and b/test/functional/configs/maps/domains.cdb differ