summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-08-04 10:48:48 +0100
committerAndrew Lewis <nerf@judo.za.org>2016-08-04 10:48:48 +0100
commit842657ed7526d2294645faaf8bbbf1fba1522ec8 (patch)
tree1a317d438c040c239b5718905a6a6afe14d3965d /test/functional
parent9fd26f1ff73dd5c3eee81dc17f1cf69445b9ae4c (diff)
downloadrspamd-842657ed7526d2294645faaf8bbbf1fba1522ec8.tar.gz
rspamd-842657ed7526d2294645faaf8bbbf1fba1522ec8.zip
[Test] Add test for CDB maps
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/cases/102_maps.robot8
-rw-r--r--test/functional/configs/maps.conf4
-rw-r--r--test/functional/configs/maps/domains.cdbbin0 -> 2084 bytes
3 files changed, 12 insertions, 0 deletions
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 000000000..889268e20
--- /dev/null
+++ b/test/functional/configs/maps/domains.cdb
Binary files differ