aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/cases')
-rw-r--r--test/functional/cases/160_antivirus.robot33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/cases/160_antivirus.robot b/test/functional/cases/160_antivirus.robot
index c34121dfd..a3e807917 100644
--- a/test/functional/cases/160_antivirus.robot
+++ b/test/functional/cases/160_antivirus.robot
@@ -70,6 +70,29 @@ FPROT CACHE MISS
${result} = Scan Message With Rspamc ${MESSAGE2}
Check Rspamc ${result} FPROT_VIRUS inverse=1
+AVAST MISS
+ Run Dummy Avast ${PORT_AVAST}
+ ${result} = Scan Message With Rspamc ${MESSAGE}
+ Check Rspamc ${result} AVAST_VIRUS inverse=1
+ Shutdown avast
+
+AVAST HIT
+ Run Dummy Avast ${PORT_AVAST} 1
+ ${result} = Scan Message With Rspamc ${MESSAGE2}
+ Check Rspamc ${result} AVAST_VIRUS
+ Should Not Contain ${result.stdout} AVAST_VIRUS_FAIL
+ Shutdown avast
+
+AVAST CACHE HIT
+ ${result} = Scan Message With Rspamc ${MESSAGE2}
+ Check Rspamc ${result} AVAST_VIRUS
+ Should Not Contain ${result.stdout} AVAST_VIRUS_FAIL
+
+AVAST CACHE MISS
+ ${result} = Scan Message With Rspamc ${MESSAGE}
+ Check Rspamc ${result} AVAST_VIRUS inverse=1
+ Should Not Contain ${result.stdout} AVAST_VIRUS_FAIL
+
*** Keywords ***
Antivirus Setup
${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/antivirus.conf
@@ -82,6 +105,7 @@ Antivirus Teardown
Shutdown Process With Children ${REDIS_PID}
Shutdown clamav
Shutdown fport
+ Shutdown avast
Terminate All Processes kill=True
Shutdown clamav
@@ -96,6 +120,10 @@ Shutdown fport duplicate
${fport_pid} = Get File if exists /tmp/dummy_fprot_dupe.pid
Run Keyword if ${fport_pid} Shutdown Process With Children ${fport_pid}
+Shutdown avast
+ ${avast_pid} = Get File if exists /tmp/dummy_avast.pid
+ Run Keyword if ${avast_pid} Shutdown Process With Children ${avast_pid}
+
Run Dummy Clam
[Arguments] ${port} ${found}=
${result} = Start Process ${TESTDIR}/util/dummy_clam.py ${port} ${found}
@@ -105,3 +133,8 @@ Run Dummy Fprot
[Arguments] ${port} ${found}= ${pid}=/tmp/dummy_fprot.pid
Start Process ${TESTDIR}/util/dummy_fprot.py ${port} ${found} ${pid}
Wait Until Created ${pid}
+
+Run Dummy Avast
+ [Arguments] ${port} ${found}=
+ ${result} = Start Process ${TESTDIR}/util/dummy_avast.py ${port} ${found}
+ Wait Until Created /tmp/dummy_avast.pid