Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SwikritiT committed Aug 5, 2021
1 parent a5370fe commit bdeb504
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions tests/acceptance/features/apiAntivirus/antivirusMain.feature
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Feature: Antivirus basic
| eicar_com.zip |
| eicarcom2.zip |

# @skip @files_primary_s3#69
@skip @files_primary_s3#69
Scenario: A file cannot be overwritten with a file containing a virus via public upload
Given as user "Alice"
And user "Alice" has created a public link share of folder "FOLDER" with change permissions
Expand All @@ -146,7 +146,7 @@ Feature: Antivirus basic
And the last lines of the log file should contain log-entries containing these attributes:
| user | app | method | message |
| -- | files_antivirus | PUT | Infected file deleted |
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be "Small text file without virus."


Scenario Outline: An empty file can be uploaded
Expand All @@ -161,7 +161,20 @@ Feature: Antivirus basic
| new |


Scenario: overwriting a file with virus in a group share
Scenario: upload a overwrite using new webDav Api
Given as user "Alice"
And user "Alice" 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 new 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"
And the last lines of the log file should contain log-entries containing these attributes:
| user | app | method | message |
| -- | files_antivirus | PUT | Infected file deleted |
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be "Small text file without virus."


Scenario Outline: overwriting a file with virus in a group share
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
Expand All @@ -174,11 +187,15 @@ Feature: Antivirus basic
And the last lines of the log file should contain log-entries containing these attributes:
| user | app | method | message |
| Brian | files_antivirus | PUT | Infected file deleted |
And the content of file "/ok-textfile.txt" for user "Alice" should be "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"
And the content of file "/ok-textfile.txt" for user "Brian" should be "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"

And the content of file "/ok-textfile.txt" for user "Alice" should be "Small text file without virus."
And the content of file "/ok-textfile.txt" for user "Brian" should be "Small text file without virus."
Examples:
| dav-path-version |
| old |
| new |

Scenario: overwriting a file with virus in a share
Scenario Outline: overwriting a file with virus in a share
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "textfile.txt" from the antivirus test data folder to "/ok-textfile.txt"
And user "Alice" has shared file "/ok-textfile.txt" with user "Brian"
Expand All @@ -188,5 +205,9 @@ Feature: Antivirus basic
And the last lines of the log file should contain log-entries containing these attributes:
| user | app | method | message |
| Brian | files_antivirus | PUT | Infected file deleted |
And the content of file "/ok-textfile.txt" for user "Alice" should be "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"
And the content of file "/ok-textfile.txt" for user "Brian" should be "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"
And the content of file "/ok-textfile.txt" for user "Alice" should be "Small text file without virus."
And the content of file "/ok-textfile.txt" for user "Brian" should be "Small text file without virus."
Examples:
| dav-path-version |
| old |
| new |

0 comments on commit bdeb504

Please sign in to comment.