mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-05 14:43:30 -04:00
add tests by setting ANTIVIRUS_MAX_SCAN_SIZE env (#6484)
This commit is contained in:
@@ -259,3 +259,32 @@ Feature: antivirus
|
||||
| filename | newfilename |
|
||||
| eicar.com | virusFile1.txt |
|
||||
| eicar_com.zip | virusFile2.zip |
|
||||
|
||||
@env-config
|
||||
Scenario Outline: upload a file with virus smaller than the upload threshold
|
||||
Given the config "ANTIVIRUS_MAX_SCAN_SIZE" has been set to "100"
|
||||
And using <dav-path-version> DAV path
|
||||
When user "Alice" uploads file "filesForUpload/filesWithVirus/eicar.com" to "/aFileWithVirus.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And user "Alice" should get a notification with subject "Virus found" and message:
|
||||
| message |
|
||||
| Virus found in aFileWithVirus.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
@env-config
|
||||
Scenario Outline: upload a file with virus larger than the upload threshold
|
||||
Given the config "ANTIVIRUS_MAX_SCAN_SIZE" has been set to "100"
|
||||
And using <dav-path-version> DAV path
|
||||
When user "Alice" uploads file "filesForUpload/filesWithVirus/eicar_com.zip" to "/aFileWithVirus.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/aFileWithVirus.txt" should exist
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
Binary file not shown.
Reference in New Issue
Block a user