Skip to content

Commit

Permalink
Merge pull request #261 from owncloud/acceptance-test-shareType
Browse files Browse the repository at this point in the history
Acceptance test steps for public link share
  • Loading branch information
phil-davis authored Sep 19, 2018
2 parents b817fa7 + e23e38b commit 216035b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Feature: Antivirus file size

Scenario: Files smaller than the upload threshold are checked for viruses when uploaded via public upload
Given as user "user0"
And user "user0" has created a public share of folder "FOLDER" with change permissions
And user "user0" has created a public link share of folder "FOLDER" with change permissions
And parameter "av_max_file_size" of app "files_antivirus" has been set to "100"
When the public uploads file "eicar.com" from the antivirus test data folder using the old WebDAV API
Then the HTTP status code should be "403"
Expand All @@ -69,7 +69,7 @@ Feature: Antivirus file size

Scenario: Files bigger than the upload threshold are not checked for viruses when uploaded via public upload
Given as user "user0"
And user "user0" has created a public share of folder "FOLDER" with change permissions
And user "user0" has created a public link share of folder "FOLDER" with change permissions
And parameter "av_max_file_size" of app "files_antivirus" has been set to "100"
When the public uploads file "eicar_com.zip" from the antivirus test data folder using the old WebDAV API
Then the HTTP status code should be "201"
Expand All @@ -78,7 +78,7 @@ Feature: Antivirus file size
@skip @files_primary_s3#69
Scenario: Files smaller than the upload threshold are checked for viruses when uploaded overwriting via public upload
Given as user "user0"
And user "user0" has created a public share of folder "FOLDER" with change permissions
And user "user0" has created a public link share of folder "FOLDER" with change permissions
And parameter "av_max_file_size" of app "files_antivirus" has been set to "100"
When the public uploads file "textfile.txt" from the antivirus test data folder using the old WebDAV API
And the public overwrites file "textfile.txt" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" using the old WebDAV API
Expand All @@ -90,7 +90,7 @@ Feature: Antivirus file size

Scenario: Files bigger than the upload threshold are not checked for viruses when uploaded overwriting via public upload
Given as user "user0"
And user "user0" has created a public share of folder "FOLDER" with change permissions
And user "user0" has created a public link share of folder "FOLDER" with change permissions
And parameter "av_max_file_size" of app "files_antivirus" has been set to "60"
When the public uploads file "textfile.txt" from the antivirus test data folder using the old WebDAV API
And the public overwrites file "textfile.txt" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" using the old WebDAV API
Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/features/apiAntivirus/antivirusMain.feature
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ Feature: Antivirus basic

Scenario: A small file without a virus can be uploaded via public upload
Given as user "user0"
And user "user0" has created a public share of folder "FOLDER" with change permissions
And user "user0" has created a public link share of folder "FOLDER" with change permissions
When the public uploads file "textfile.txt" from the antivirus test data folder using the old WebDAV API
Then the HTTP status code should be "201"
And as "user0" the file "/FOLDER/textfile.txt" should exist

Scenario Outline: A small file with a virus cannot be uploaded via public upload
Given as user "user0"
And user "user0" has created a public share of folder "FOLDER" with change permissions
And user "user0" has created a public link share of folder "FOLDER" with change permissions
When the public uploads file "<virus-file-name>" from the antivirus test data folder using the old WebDAV API
Then the HTTP status code should be "403"
And the last lines of the log file should contain log-entries containing these attributes:
Expand All @@ -103,7 +103,7 @@ Feature: Antivirus basic
@skip @files_primary_s3#69
Scenario: A file cannot be overwritten with a file containing a virus via public upload
Given as user "user0"
And user "user0" has created a public share of folder "FOLDER" with change permissions
And user "user0" has created a public link share of folder "FOLDER" with change permissions
When the public uploads file "textfile.txt" from the antivirus test data folder using the old WebDAV API
And the public overwrites file "textfile.txt" with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" using the old WebDAV API
Then the HTTP status code should be "403"
Expand Down

0 comments on commit 216035b

Please sign in to comment.