|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
|
@api @files_versions-app-required @issue-1262
|
|
|
|
|
@api
|
|
|
|
|
|
|
|
|
|
Feature: dav-versions
|
|
|
|
|
|
|
|
|
@@ -13,7 +13,7 @@ Feature: dav-versions
|
|
|
|
|
Then the HTTP status code should be "201"
|
|
|
|
|
And the version folder of file "/davtest.txt" for user "Alice" should contain "0" elements
|
|
|
|
|
|
|
|
|
|
@issue-1343 @issue-1321
|
|
|
|
|
|
|
|
|
|
Scenario: Upload file and no version is available using various chunking methods (except new chunking)
|
|
|
|
|
When user "Alice" uploads file "filesForUpload/davtest.txt" to filenames based on "/davtest.txt" with all mechanisms except new chunking using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "200"
|
|
|
|
@@ -29,7 +29,7 @@ Feature: dav-versions
|
|
|
|
|
And the version folder of file "/davtest.txt" for user "Alice" should contain "1" element
|
|
|
|
|
And the content length of file "/davtest.txt" with version index "1" for user "Alice" in versions folder should be "8"
|
|
|
|
|
|
|
|
|
|
@issue-1343 @issue-1321
|
|
|
|
|
|
|
|
|
|
Scenario: Upload a file twice and versions are available using various chunking methods (except new chunking)
|
|
|
|
|
When user "Alice" uploads file "filesForUpload/davtest.txt" to filenames based on "/davtest.txt" with all mechanisms except new chunking using the WebDAV API
|
|
|
|
|
And user "Alice" uploads file "filesForUpload/davtest.txt" to filenames based on "/davtest.txt" with all mechanisms except new chunking using the WebDAV API
|
|
|
|
@@ -66,7 +66,7 @@ Feature: dav-versions
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the content of file "/davtest.txt" for user "Alice" should be "Back To The Future."
|
|
|
|
|
|
|
|
|
|
@smokeTest @skipOnStorage:ceph @files_primary_s3-issue-161 @issue-1343 @issue-1321
|
|
|
|
|
@smokeTest @skipOnStorage:ceph @files_primary_s3-issue-161
|
|
|
|
|
Scenario Outline: Uploading a chunked file does create the correct version that can be restored
|
|
|
|
|
Given using <dav-path> DAV path
|
|
|
|
|
And user "Alice" has uploaded file with content "textfile0" to "textfile0.txt"
|
|
|
|
@@ -127,7 +127,7 @@ Feature: dav-versions
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the content of file "/renamedfile.txt" for user "Alice" should be "old content"
|
|
|
|
|
|
|
|
|
|
@issue-1238
|
|
|
|
|
|
|
|
|
|
Scenario: User can access version number after moving a file
|
|
|
|
|
Given user "Alice" has created folder "testFolder"
|
|
|
|
|
And user "Alice" has uploaded file with content "uploaded content" to "textfile0.txt"
|
|
|
|
@@ -146,7 +146,7 @@ Feature: dav-versions
|
|
|
|
|
Then the HTTP status code should be "207"
|
|
|
|
|
And the number of versions should be "0"
|
|
|
|
|
|
|
|
|
|
@issue-1234
|
|
|
|
|
|
|
|
|
|
Scenario: the number of etag elements in response changes according to version of the file
|
|
|
|
|
Given user "Alice" has uploaded file with content "uploaded content" to "textfile0.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "version 1" to "textfile0.txt"
|
|
|
|
@@ -249,14 +249,14 @@ Feature: dav-versions
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the content of file "/davtest.txt" for user "Alice" should be "Old Test Content."
|
|
|
|
|
|
|
|
|
|
@issue-5010
|
|
|
|
|
|
|
|
|
|
Scenario: Upload the same file twice with the same mtime and a version is available
|
|
|
|
|
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
|
|
|
|
When user "Alice" uploads file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the version folder of file "/file.txt" for user "Alice" should contain "1" element
|
|
|
|
|
|
|
|
|
|
@issue-5010
|
|
|
|
|
|
|
|
|
|
Scenario: Upload the same file more than twice with the same mtime and only one version is available
|
|
|
|
|
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
|
|
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
|
|
|
@@ -264,7 +264,7 @@ Feature: dav-versions
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the version folder of file "/file.txt" for user "Alice" should contain "1" element
|
|
|
|
|
|
|
|
|
|
@issue-5010
|
|
|
|
|
|
|
|
|
|
Scenario: Upload the same file twice with the same mtime and no version after restoring
|
|
|
|
|
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
|
|
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
|
|
|
@@ -272,21 +272,6 @@ Feature: dav-versions
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the version folder of file "/file.txt" for user "Alice" should contain "0" element
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: User can access meta folder of a file which is owned by somebody else but shared with that user
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has uploaded file with content "123" to "/davtest.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "456789" to "/davtest.txt"
|
|
|
|
|
And we save it into "FILEID"
|
|
|
|
|
And user "Alice" has created a share with settings
|
|
|
|
|
| path | /davtest.txt |
|
|
|
|
|
| shareType | user |
|
|
|
|
|
| shareWith | Brian |
|
|
|
|
|
| permissions | read |
|
|
|
|
|
When user "Brian" accepts share "/davtest.txt" offered by user "Alice" using the sharing API
|
|
|
|
|
Then the HTTP status code should be "200"
|
|
|
|
|
And the version folder of fileId "<<FILEID>>" for user "Brian" should contain "1" element
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: sharer of a file can see the old version information when the sharee changes the content of the file
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
@@ -295,8 +280,9 @@ Feature: dav-versions
|
|
|
|
|
And user "Brian" has accepted share "/sharefile.txt" offered by user "Alice"
|
|
|
|
|
When user "Brian" uploads file with content "Second content" to "/Shares/sharefile.txt" using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the version folder of file "/Shares/sharefile.txt" for user "Brian" should contain "1" element
|
|
|
|
|
And the version folder of file "/sharefile.txt" for user "Alice" should contain "1" element
|
|
|
|
|
When user "Brian" gets the number of versions of file "/Shares/sharefile.txt"
|
|
|
|
|
Then the HTTP status code should be "403"
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: sharer of a file can restore the original content of a shared file after the file has been modified by the sharee
|
|
|
|
@@ -324,23 +310,23 @@ Feature: dav-versions
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: sharee can restore a file inside a shared folder modified by sharee
|
|
|
|
|
Scenario: sharee cannot see a version of a file inside a shared folder when modified by sharee
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has created folder "/sharingfolder"
|
|
|
|
|
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
|
|
|
|
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
|
|
|
|
|
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
|
|
|
|
And user "Alice" has uploaded file with content "First content" to "/sharingfolder/sharefile.txt"
|
|
|
|
|
And user "Brian" has uploaded file with content "Second content" to "/Shares/sharingfolder/sharefile.txt"
|
|
|
|
|
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
|
|
|
|
When user "Brian" has uploaded file with content "Second content" to "/Shares/sharingfolder/sharefile.txt"
|
|
|
|
|
And user "Brian" gets the number of versions of file "/Shares/sharingfolder/sharefile.txt"
|
|
|
|
|
Then the HTTP status code should be "403"
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "Second content"
|
|
|
|
|
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "Second content"
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: sharer can restore a file inside a shared folder created by sharee and modified by sharer
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has created folder "/sharingfolder"
|
|
|
|
|
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
|
|
|
|
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
|
|
|
|
|
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
|
|
|
|
And user "Brian" has uploaded file with content "First content" to "/Shares/sharingfolder/sharefile.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "Second content" to "/sharingfolder/sharefile.txt"
|
|
|
|
@@ -349,24 +335,11 @@ Feature: dav-versions
|
|
|
|
|
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: sharee can restore a file inside a shared folder created by sharee and modified by sharer
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has created folder "/sharingfolder"
|
|
|
|
|
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
|
|
|
|
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
|
|
|
|
And user "Brian" has uploaded file with content "First content" to "/Shares/sharingfolder/sharefile.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "Second content" to "/sharingfolder/sharefile.txt"
|
|
|
|
|
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: sharer can restore a file inside a shared folder created by sharee and modified by sharee
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has created folder "/sharingfolder"
|
|
|
|
|
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
|
|
|
|
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
|
|
|
|
|
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
|
|
|
|
And user "Brian" has uploaded file with content "old content" to "/Shares/sharingfolder/sharefile.txt"
|
|
|
|
|
And user "Brian" has uploaded file with content "new content" to "/Shares/sharingfolder/sharefile.txt"
|
|
|
|
@@ -375,19 +348,6 @@ Feature: dav-versions
|
|
|
|
|
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "old content"
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "old content"
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: sharee can restore a file inside a shared folder created by sharer and modified by sharer
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has created folder "/sharingfolder"
|
|
|
|
|
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
|
|
|
|
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
|
|
|
|
And user "Alice" has uploaded file with content "old content" to "/sharingfolder/sharefile.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "new content" to "/sharingfolder/sharefile.txt"
|
|
|
|
|
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "old content"
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "old content"
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario: sharer can restore a file inside a group shared folder modified by sharee
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
@@ -408,7 +368,7 @@ Feature: dav-versions
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
|
|
|
|
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Carol" should be "First content"
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required @issue-1238
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario Outline: Moving a file (with versions) into a shared folder as the sharee and as the sharer
|
|
|
|
|
Given using <dav_version> DAV path
|
|
|
|
|
And user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
@@ -428,13 +388,12 @@ Feature: dav-versions
|
|
|
|
|
And the content of file "/testshare/testfile.txt" for user "Brian" should be "test data 3"
|
|
|
|
|
And as "<mover>" file "/testfile.txt" should not exist
|
|
|
|
|
And the version folder of file "/Shares/testshare/testfile.txt" for user "Alice" should contain "2" elements
|
|
|
|
|
And the version folder of file "/testshare/testfile.txt" for user "Brian" should contain "2" elements
|
|
|
|
|
Examples:
|
|
|
|
|
| dav_version | mover | dst-folder |
|
|
|
|
|
| old | Brian | /testshare |
|
|
|
|
|
| new | Brian | /testshare |
|
|
|
|
|
|
|
|
|
|
@files_sharing-app-required @issue-1238
|
|
|
|
|
@files_sharing-app-required
|
|
|
|
|
Scenario Outline: Moving a file (with versions) out of a shared folder as the sharee and as the sharer
|
|
|
|
|
Given using <dav_version> DAV path
|
|
|
|
|
And user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
@@ -480,49 +439,15 @@ Feature: dav-versions
|
|
|
|
|
And user "Alice" has shared file "textfile0.txt" with user "Brian"
|
|
|
|
|
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
|
|
|
|
|
When user "Brian" tries to get versions of file "textfile0.txt" from "Alice"
|
|
|
|
|
Then the HTTP status code should be "207"
|
|
|
|
|
And the number of versions should be "3"
|
|
|
|
|
Then the HTTP status code should be "403"
|
|
|
|
|
|
|
|
|
|
@issue-760
|
|
|
|
|
|
|
|
|
|
Scenario: Receiver tries get file versions of shared file before receiving it
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has uploaded file with content "textfile0" to "textfile0.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "version 1" to "textfile0.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "version 2" to "textfile0.txt"
|
|
|
|
|
And we save it into "FILEID"
|
|
|
|
|
And user "Alice" has shared file "textfile0.txt" with user "Brian"
|
|
|
|
|
When user "Brian" tries to get versions of file "textfile0.txt" from "Alice"
|
|
|
|
|
Then the HTTP status code should be "404"
|
|
|
|
|
And the value of the item "//s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\NotFound"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario: sharer tries get file versions of shared file when the sharee changes the content of the file
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has uploaded file with content "First content" to "sharefile.txt"
|
|
|
|
|
And user "Alice" has shared file "sharefile.txt" with user "Brian"
|
|
|
|
|
And user "Brian" has accepted share "/sharefile.txt" offered by user "Alice"
|
|
|
|
|
When user "Brian" has uploaded file with content "Second content" to "/Shares/sharefile.txt"
|
|
|
|
|
Then the HTTP status code should be "204"
|
|
|
|
|
And the version folder of file "/Shares/sharefile.txt" for user "Brian" should contain "1" element
|
|
|
|
|
And the version folder of file "/sharefile.txt" for user "Alice" should contain "1" element
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario: download old versions of a shared file as share receiver
|
|
|
|
|
Given user "Brian" has been created with default attributes and without skeleton files
|
|
|
|
|
And user "Alice" has uploaded file with content "uploaded content" to "textfile0.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "version 1" to "textfile0.txt"
|
|
|
|
|
And user "Alice" has uploaded file with content "version 2" to "textfile0.txt"
|
|
|
|
|
And user "Alice" has shared file "textfile0.txt" with user "Brian"
|
|
|
|
|
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
|
|
|
|
|
When user "Brian" downloads the version of file "/Shares/textfile0.txt" with the index "1"
|
|
|
|
|
Then the HTTP status code should be "200"
|
|
|
|
|
And the following headers should be set
|
|
|
|
|
| header | value |
|
|
|
|
|
| Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" |
|
|
|
|
|
And the downloaded content should be "version 1"
|
|
|
|
|
When user "Brian" downloads the version of file "/Shares/textfile0.txt" with the index "2"
|
|
|
|
|
Then the HTTP status code should be "200"
|
|
|
|
|
And the following headers should be set
|
|
|
|
|
| header | value |
|
|
|
|
|
| Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" |
|
|
|
|
|
And the downloaded content should be "uploaded content"
|
|
|
|
|
Then the HTTP status code should be "403"
|
|
|
|
|
And the value of the item "//s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\Forbidden"
|
|
|
|
|