diff --git a/tests/acceptance/features/apiAntivirus/antivirus.feature b/tests/acceptance/features/apiAntivirus/antivirus.feature index d4cc35f5f..a4273838e 100644 --- a/tests/acceptance/features/apiAntivirus/antivirus.feature +++ b/tests/acceptance/features/apiAntivirus/antivirus.feature @@ -368,3 +368,43 @@ Feature: antivirus | old | | new | | spaces | + + + Scenario Outline: try to overwrite a file with the virus content in group share + Given using DAV path + And user "Brian" has been created with default attributes and without skeleton files + And group "group1" has been created + And user "Brian" has been added to group "group1" + And user "Alice" has been added to group "group1" + And user "Alice" has uploaded file with content "hello" to "/test.txt" + And user "Alice" has shared file "test.txt" with group "group1" + And user "Brian" has accepted share "/test.txt" offered by user "Alice" + When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "test.txt" using the WebDAV API + Then the HTTP status code should be "201" + And user "Brian" should get a notification with subject "Virus found" and message: + | message | + | Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 | + And the content of file "/test.txt" for user "Alice" should be "hello" + And the content of file "Shares/test.txt" for user "Brian" should be "hello" + Examples: + | dav-path-version | + | old | + | new | + + + Scenario: try to overwrite a file with the virus content in group share using spaces dav endpoint + Given using spaces DAV path + And user "Brian" has been created with default attributes and without skeleton files + And group "group1" has been created + And user "Brian" has been added to group "group1" + And user "Alice" has been added to group "group1" + And user "Alice" has uploaded file with content "hello" to "/test.txt" + And user "Alice" has shared file "test.txt" with group "group1" + And user "Brian" has accepted share "/test.txt" offered by user "Alice" + When user "Brian" uploads a file "filesForUpload/filesWithVirus/eicar.com" to "/test.txt" in space "Shares" using the WebDAV API + Then the HTTP status code should be "204" + And user "Brian" should get a notification with subject "Virus found" and message: + | message | + | Virus found in test.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 | + And for user "Brian" the content of the file "/test.txt" of the space "Shares" should be "hello" + And the content of file "/test.txt" for user "Alice" should be "hello"