aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/cases')
-rw-r--r--test/functional/cases/102_multimap.robot9
-rw-r--r--test/functional/cases/160_antivirus.robot14
2 files changed, 20 insertions, 3 deletions
diff --git a/test/functional/cases/102_multimap.robot b/test/functional/cases/102_multimap.robot
index 977a84991..569f75e3b 100644
--- a/test/functional/cases/102_multimap.robot
+++ b/test/functional/cases/102_multimap.robot
@@ -148,6 +148,15 @@ MAP - REDIS - HOSTNAME MISS
${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname rspamd.com
Check Rspamc ${result} REDIS_HOSTNAME inverse=1
+MAP - REDIS - HOSTNAME - EXPANSION - HIT
+ Redis HSET 127.0.0.1.foo.com redistest.example.net ${EMPTY}
+ ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname redistest.example.net --rcpt bob@foo.com
+ Check Rspamc ${result} REDIS_HOSTNAME_EXPANSION
+
+MAP - REDIS - HOSTNAME - EXPANSION - MISS
+ ${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1 --hostname redistest.example.net --rcpt bob@bar.com
+ Check Rspamc ${result} REDIS_HOSTNAME_EXPANSION inverse=1
+
MAP - REDIS - IP
Redis HSET ipaddr 127.0.0.1 ${EMPTY}
${result} = Scan Message With Rspamc ${MESSAGE} --ip 127.0.0.1
diff --git a/test/functional/cases/160_antivirus.robot b/test/functional/cases/160_antivirus.robot
index ec43329e3..edc063445 100644
--- a/test/functional/cases/160_antivirus.robot
+++ b/test/functional/cases/160_antivirus.robot
@@ -44,14 +44,22 @@ FPROT MISS
FPROT HIT - PATTERN
Run Dummy Fprot ${PORT_FPROT} 1
+ Run Dummy Fprot ${PORT_FPROT_DUPLICATE} 1 /tmp/dummy_fprot_dupe.pid
${result} = Scan Message With Rspamc ${MESSAGE}
Check Rspamc ${result} FPROT_EICAR (1.00)[EICAR_Test_File]
Should Not Contain ${result.stdout} CLAMAV_VIRUS
+ # Also check ordered pattern match
+ Should Contain ${result.stdout} FPROT_VIRUS_DUPLICATE_PATTERN
+ Should Not Contain ${result.stdout} FPROT_VIRUS_DUPLICATE_DEFAULT
+ Should Not Contain ${result.stdout} FPROT_VIRUS_DUPLICATE_NOPE
FPROT CACHE HIT
${result} = Scan Message With Rspamc ${MESSAGE}
Check Rspamc ${result} FPROT_EICAR (1.00)[EICAR_Test_File]
Should Not Contain ${result.stdout} CLAMAV_VIRUS
+ # Also check ordered pattern match
+ Should Contain ${result.stdout} FPROT_VIRUS_DUPLICATE_PATTERN
+ Should Not Contain ${result.stdout} FPROT_VIRUS_DUPLICATE_DEFAULT
FPROT CACHE MISS
${result} = Scan Message With Rspamc ${MESSAGE2}
@@ -74,6 +82,6 @@ Run Dummy Clam
Wait Until Created /tmp/dummy_clamav.pid
Run Dummy Fprot
- [Arguments] ${port} ${found}=
- ${result} = Start Process ${TESTDIR}/util/dummy_fprot.py ${port} ${found}
- Wait Until Created /tmp/dummy_fprot.pid
+ [Arguments] ${port} ${found}= ${pid}=/tmp/dummy_fprot.pid
+ ${result} = Start Process ${TESTDIR}/util/dummy_fprot.py ${port} ${found} ${pid}
+ Wait Until Created ${pid}