From 842657ed7526d2294645faaf8bbbf1fba1522ec8 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Thu, 4 Aug 2016 10:48:48 +0100 Subject: [PATCH] [Test] Add test for CDB maps --- test/functional/cases/102_maps.robot | 8 ++++++++ test/functional/configs/maps.conf | 4 ++++ test/functional/configs/maps/domains.cdb | Bin 0 -> 2084 bytes 3 files changed, 12 insertions(+) create mode 100644 test/functional/configs/maps/domains.cdb diff --git a/test/functional/cases/102_maps.robot b/test/functional/cases/102_maps.robot index 6070cf5e4..1c7bcb3bc 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 039ef3fb0..09a8e8cd7 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 0000000000000000000000000000000000000000..889268e206e82efbac3c788461baf168ca341714 GIT binary patch literal 2084 zcmWgPU;qP=QF=5SfFUrN4o33>6EFx=pyk0R4M`89;V>Ewpb!{t>3|#PCq^Jntw_u* X$Vt^p&d)Uj`4a@1`nSJe0G0y)WgROa literal 0 HcmV?d00001 -- 2.39.5