summaryrefslogtreecommitdiffstats
path: root/test/functional/cases
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-28 16:20:18 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-28 17:20:50 +0100
commit398332ccb20dc9ead073e297cc540512a38c98df (patch)
treeb885da27389cccf57e21f04eb8063e27acdfe29a /test/functional/cases
parent1cce1f1e6d1b21c40612f98f25d84d33ccd4fcde (diff)
downloadrspamd-398332ccb20dc9ead073e297cc540512a38c98df.tar.gz
rspamd-398332ccb20dc9ead073e297cc540512a38c98df.zip
[Test] Add more tests for multimap module
Diffstat (limited to 'test/functional/cases')
-rw-r--r--test/functional/cases/102_maps.robot44
1 files changed, 43 insertions, 1 deletions
diff --git a/test/functional/cases/102_maps.robot b/test/functional/cases/102_maps.robot
index 31bf8fc66..0f89a6ff8 100644
--- a/test/functional/cases/102_maps.robot
+++ b/test/functional/cases/102_maps.robot
@@ -17,4 +17,46 @@ MAP - DNSBL HIT
MAP - DNSBL MISS
${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.1
- Check Rspamc ${result} DNSBL_MAP inverse=1 rc_nocheck=1 \ No newline at end of file
+ Check Rspamc ${result} DNSBL_MAP inverse=1 rc_nocheck=1
+
+MAP - IP HIT
+ ${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.1
+ Check Rspamc ${result} IP_MAP
+
+MAP - IP MISS
+ ${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.2
+ Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1
+
+MAP - IP MASK
+ ${result} = Scan Message With Rspamc ${MESSAGE} -i 10.1.0.10
+ Check Rspamc ${result} IP_MAP
+
+MAP - IP MASK MISS
+ ${result} = Scan Message With Rspamc ${MESSAGE} -i 11.1.0.10
+ Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1
+
+MAP - IP V6
+ ${result} = Scan Message With Rspamc ${MESSAGE} -i ::1
+ Check Rspamc ${result} IP_MAP
+
+MAP - IP V6 MISS
+ ${result} = Scan Message With Rspamc ${MESSAGE} -i fe80::1
+ Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1
+
+MAP - FROM
+ ${result} = Scan Message With Rspamc ${MESSAGE} --from user@example.com
+ Check Rspamc ${result} FROM_MAP
+
+MAP - FROM MISS
+ ${result} = Scan Message With Rspamc ${MESSAGE} --from user@other.com
+ Check Rspamc ${result} FROM_MAP inverse=1 rc_nocheck=1
+
+MAP - FROM REGEXP
+ ${result} = Scan Message With Rspamc ${MESSAGE} --from user123@test.com
+ Check Rspamc ${result} REGEXP_MAP
+ ${result} = Scan Message With Rspamc ${MESSAGE} --from somebody@exAmplE.com
+ Check Rspamc ${result} REGEXP_MAP
+
+MAP - FROM REGEXP MISS
+ ${result} = Scan Message With Rspamc ${MESSAGE} --from user@other.org
+ Check Rspamc ${result} REGEXP_MAP inverse=1 rc_nocheck=1 \ No newline at end of file