aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/102_multimap.robot8
-rw-r--r--test/functional/configs/maps/top.list2
-rw-r--r--test/functional/configs/multimap.conf5
3 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/cases/102_multimap.robot b/test/functional/cases/102_multimap.robot
index c46fff39b..7aac43e4e 100644
--- a/test/functional/cases/102_multimap.robot
+++ b/test/functional/cases/102_multimap.robot
@@ -133,6 +133,14 @@ MAP - HOSTNAME MISS
${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname rspamd.com
Check Rspamc ${result} HOSTNAME_MAP inverse=1
+MAP - TOP
+ ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname example.com.au
+ Check Rspamc ${result} HOSTNAME_TOP_MAP
+
+MAP - TOP MISS
+ ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname example.com.bg
+ Check Rspamc ${result} HOSTNAME_TOP_MAP inverse=1
+
MAP - CDB - HOSTNAME
${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname example.com
Check Rspamc ${result} CDB_HOSTNAME
diff --git a/test/functional/configs/maps/top.list b/test/functional/configs/maps/top.list
new file mode 100644
index 000000000..d8a152ed8
--- /dev/null
+++ b/test/functional/configs/maps/top.list
@@ -0,0 +1,2 @@
+au
+#bg \ No newline at end of file
diff --git a/test/functional/configs/multimap.conf b/test/functional/configs/multimap.conf
index 98701794f..61bd310a8 100644
--- a/test/functional/configs/multimap.conf
+++ b/test/functional/configs/multimap.conf
@@ -58,6 +58,11 @@ multimap {
type = "hostname";
map = "${TESTDIR}/configs/maps/domains.list";
}
+ HOSTNAME_TOP_MAP {
+ type = "hostname";
+ filter = "top";
+ map = "${TESTDIR}/configs/maps/top.list";
+ }
CDB_HOSTNAME {
type = "hostname";
map = "cdb://${TESTDIR}/configs/maps/domains.cdb";