]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Add test for CDB maps 805/head
authorAndrew Lewis <nerf@judo.za.org>
Thu, 4 Aug 2016 09:48:48 +0000 (10:48 +0100)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 4 Aug 2016 09:48:48 +0000 (10:48 +0100)
test/functional/cases/102_maps.robot
test/functional/configs/maps.conf
test/functional/configs/maps/domains.cdb [new file with mode: 0644]

index 6070cf5e44eea4f93f1d6ca540d7e4f13277bbc9..1c7bcb3bcc23264f98234f33e4bdf51a5176c270 100644 (file)
@@ -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
index 039ef3fb00799b31341f3d2d38b1a036a22ef0f4..09a8e8cd789a2e5ad251125a99abb38853e657ed 100644 (file)
@@ -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 (file)
index 0000000..889268e
Binary files /dev/null and b/test/functional/configs/maps/domains.cdb differ