add tests by setting ANTIVIRUS_MAX_SCAN_SIZE env (#6484)

This commit is contained in:
Sabin Panta
2023-06-14 12:26:10 +05:45
committed by GitHub
parent acaf53b46d
commit 111ff55579
2 changed files with 29 additions and 0 deletions

View File

@@ -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 |