mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-12-05 05:43:36 -05:00
* tests: remove unused tags from the acceptance tests Remove the tags that neither the CI of opencloud nor the one of reva filters on, and that no hook uses: @smokeTest, @skipOnStorage:ceph, @skipOnStorage:scality, @skipOnOpencloud-decomposeds3-Storage (the CI only runs posix and decomposed), @sqliteDB, @notification and @skip-local-run. A tag line left empty becomes an empty line, so that the line numbers of the scenarios, which the expected failures of opencloud and reva refer to, stay the same. Also fix the typo @@skipOnReva, and write the issue tags the same way: @issues-<n> becomes @issue-<n>, @web-issue-<n> becomes @issue-web-<n>. Assisted-by: Claude Code:claude-opus-5-5 * tests: run the search properties scenarios as expected failures The two scenarios that check the properties of search results were skipped, since the search REPORT returns an empty d:getetag (#3501) and the step retried the whole check for 20 seconds, which made them too slow as expected failures. - retry the search only until the entry is indexed, then check its properties once: once found, the entry is complete, so a wrong value fails right away - check what the search returns: d:getcontentlength for files, the real size of 12 bytes, a file id of the form <uuid>$<uuid>!<uuid>, anchored patterns, and no oc:owner-id and oc:owner-display-name, which the search response never contains - list them as expected failures of #3501 instead of skipping them Without the d:getetag check, both scenarios pass. Assisted-by: Claude Code:claude-opus-5-5 * lint fix
284 lines
13 KiB
Gherkin
284 lines
13 KiB
Gherkin
@issue-1324
|
|
Feature: files and folders can be deleted from the trashbin
|
|
As a user
|
|
I want to delete files and folders from the trashbin
|
|
So that I can control my trashbin space and which files are kept in that space
|
|
|
|
Background:
|
|
Given user "Alice" has been created with default attributes
|
|
And user "Alice" has uploaded file with content "to delete" to "/textfile0.txt"
|
|
And user "Alice" has uploaded file with content "to delete" to "/textfile1.txt"
|
|
And user "Alice" has created folder "PARENT"
|
|
And user "Alice" has created folder "PARENT/CHILD"
|
|
And user "Alice" has uploaded file with content "to delete" to "/PARENT/parent.txt"
|
|
And user "Alice" has uploaded file with content "to delete" to "/PARENT/CHILD/child.txt"
|
|
|
|
|
|
Scenario Outline: trashbin can be emptied
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded file with content "file with comma" to "sample,0.txt"
|
|
And user "Alice" has uploaded file with content "file with comma" to "sample,1.txt"
|
|
And user "Alice" has deleted file "<file-name>"
|
|
And user "Alice" has deleted file "<file-name-2>"
|
|
When user "Alice" empties the trashbin using the trashbin API
|
|
Then the HTTP status code should be "204"
|
|
And as "Alice" the file with original path "<file-name>" should not exist in the trashbin
|
|
And as "Alice" the file with original path "<file-name-2>" should not exist in the trashbin
|
|
Examples:
|
|
| dav-path-version | file-name | file-name-2 |
|
|
| new | textfile0.txt | textfile1.txt |
|
|
| new | sample,0.txt | sample,1.txt |
|
|
| spaces | textfile0.txt | textfile1.txt |
|
|
| spaces | sample,0.txt | sample,1.txt |
|
|
|
|
|
|
Scenario Outline: delete a single file from the trashbin
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has deleted file "/textfile0.txt"
|
|
And user "Alice" has deleted file "/textfile1.txt"
|
|
And user "Alice" has deleted file "/PARENT/parent.txt"
|
|
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
|
|
When user "Alice" deletes the file with original path "textfile1.txt" from the trashbin using the trashbin API
|
|
Then the HTTP status code should be "204"
|
|
And as "Alice" the file with original path "/textfile1.txt" should not exist in the trashbin
|
|
But as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: delete multiple files from the trashbin and make sure the correct ones are gone
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/textfile0.txt"
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/child.txt"
|
|
And user "Alice" has deleted file "/textfile0.txt"
|
|
And user "Alice" has deleted file "/textfile1.txt"
|
|
And user "Alice" has deleted file "/PARENT/parent.txt"
|
|
And user "Alice" has deleted file "/PARENT/child.txt"
|
|
And user "Alice" has deleted file "/PARENT/textfile0.txt"
|
|
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
|
|
When user "Alice" deletes the file with original path "/PARENT/textfile0.txt" from the trashbin using the trashbin API
|
|
And user "Alice" deletes the file with original path "/PARENT/CHILD/child.txt" from the trashbin using the trashbin API
|
|
Then the HTTP status code of responses on all endpoints should be "204"
|
|
And as "Alice" the file with original path "/PARENT/textfile0.txt" should not exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should not exist in the trashbin
|
|
But as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/child.txt" should exist in the trashbin
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
@issue-3544 @issue-9791
|
|
Scenario Outline: user tries to delete another user's trashbin
|
|
Given using <dav-path-version> DAV path
|
|
And user "Brian" has been created with default attributes
|
|
And user "Alice" has deleted file "/textfile0.txt"
|
|
And user "Alice" has deleted file "/textfile1.txt"
|
|
And user "Alice" has deleted file "/PARENT/parent.txt"
|
|
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
|
|
When user "Brian" tries to delete the file with original path "textfile1.txt" from the trashbin of user "Alice" using the trashbin API
|
|
Then the HTTP status code should be "404"
|
|
And as "Alice" the file with original path "/textfile1.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: user tries to delete trashbin file using invalid password
|
|
Given using <dav-path-version> DAV path
|
|
And user "Brian" has been created with default attributes
|
|
And user "Alice" has deleted file "/textfile0.txt"
|
|
And user "Alice" has deleted file "/textfile1.txt"
|
|
And user "Alice" has deleted file "/PARENT/parent.txt"
|
|
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
|
|
When user "Brian" tries to delete the file with original path "textfile1.txt" from the trashbin of user "Alice" using the password "invalid" and the trashbin API
|
|
Then the HTTP status code should be "401"
|
|
And as "Alice" the file with original path "/textfile1.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: user tries to delete trashbin file using no password
|
|
Given using <dav-path-version> DAV path
|
|
And user "Brian" has been created with default attributes
|
|
And user "Alice" has deleted file "/textfile0.txt"
|
|
And user "Alice" has deleted file "/textfile1.txt"
|
|
And user "Alice" has deleted file "/PARENT/parent.txt"
|
|
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
|
|
When user "Brian" tries to delete the file with original path "textfile1.txt" from the trashbin of user "Alice" using the password "" and the trashbin API
|
|
Then the HTTP status code should be "401"
|
|
And as "Alice" the file with original path "/textfile1.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: delete a folder that contains a file from the trashbin
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has created folder "FOLDER"
|
|
And user "Alice" has created folder "FOLDER/CHILD"
|
|
And user "Alice" has uploaded file with content "to delete" to "/FOLDER/parent.txt"
|
|
And user "Alice" has uploaded file with content "to delete" to "/FOLDER/CHILD/child.txt"
|
|
And user "Alice" has deleted folder "/PARENT"
|
|
And user "Alice" has deleted folder "/FOLDER"
|
|
When user "Alice" deletes the folder with original path "/PARENT" from the trashbin using the trashbin API
|
|
Then the HTTP status code should be "204"
|
|
And as "Alice" the file with original path "/PARENT/parent.txt" should not exist in the trashbin
|
|
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should not exist in the trashbin
|
|
And as "Alice" the folder with original path "/PARENT/CHILD/" should not exist in the trashbin
|
|
But as "Alice" the file with original path "/FOLDER/parent.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/FOLDER/CHILD/child.txt" should exist in the trashbin
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: delete a subfolder from a deleted folder from the trashbin
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has created folder "FOLDER"
|
|
And user "Alice" has created folder "FOLDER/CHILD"
|
|
And user "Alice" has uploaded file with content "to delete" to "/FOLDER/parent.txt"
|
|
And user "Alice" has uploaded file with content "to delete" to "/FOLDER/CHILD/child.txt"
|
|
And user "Alice" has deleted folder "/PARENT"
|
|
And user "Alice" has deleted folder "/FOLDER"
|
|
When user "Alice" deletes the folder with original path "/PARENT/CHILD" from the trashbin using the trashbin API
|
|
Then the HTTP status code should be "204"
|
|
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should not exist in the trashbin
|
|
And as "Alice" the folder with original path "/PARENT/CHILD/" should not exist in the trashbin
|
|
But as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/FOLDER/parent.txt" should exist in the trashbin
|
|
And as "Alice" the file with original path "/FOLDER/CHILD/child.txt" should exist in the trashbin
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: delete files with special characters from the trashbin
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded the following files with content "special character file"
|
|
| path |
|
|
| qa&dev.txt |
|
|
| !@tester$^.txt |
|
|
| %file *?2.txt |
|
|
| # %ab ab?=ed.txt |
|
|
And user "Alice" has deleted the following files
|
|
| path |
|
|
| qa&dev.txt |
|
|
| !@tester$^.txt |
|
|
| %file *?2.txt |
|
|
| # %ab ab?=ed.txt |
|
|
When user "Alice" deletes the following files with original path from the trashbin
|
|
| path |
|
|
| qa&dev.txt |
|
|
| !@tester$^.txt |
|
|
| %file *?2.txt |
|
|
| # %ab ab?=ed.txt |
|
|
Then the HTTP status code of responses on all endpoints should be "204"
|
|
And as "Alice" the files with following original paths should not exist in the trashbin
|
|
| path |
|
|
| qa&dev.txt |
|
|
| !@tester$^.txt |
|
|
| %file *?2.txt |
|
|
| # %ab ab?=ed.txt |
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: delete folders with special characters from the trashbin
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has created the following folders
|
|
| path |
|
|
| qa&dev |
|
|
| !@tester$^ |
|
|
| %file *?2 |
|
|
| # %ab ab?=ed |
|
|
And user "Alice" has deleted the following folders
|
|
| path |
|
|
| qa&dev |
|
|
| !@tester$^ |
|
|
| %file *?2 |
|
|
| # %ab ab?=ed |
|
|
When user "Alice" deletes the following files with original path from the trashbin
|
|
| path |
|
|
| qa&dev |
|
|
| !@tester$^ |
|
|
| %file *?2 |
|
|
| # %ab ab?=ed |
|
|
Then the HTTP status code of responses on all endpoints should be "204"
|
|
And as "Alice" the folders with following original paths should not exist in the trashbin
|
|
| path |
|
|
| qa&dev |
|
|
| !@tester$^ |
|
|
| %file *?2 |
|
|
| # %ab ab?=ed |
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: delete folders with dot in the name from the trashbin
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has created the following folders
|
|
| path |
|
|
| /fo. |
|
|
| /fo.1 |
|
|
| /fo...1.. |
|
|
| /... |
|
|
| /..fo |
|
|
| /fo.xyz |
|
|
| /fo.exe |
|
|
And user "Alice" has deleted the following folders
|
|
| path |
|
|
| /fo. |
|
|
| /fo.1 |
|
|
| /fo...1.. |
|
|
| /... |
|
|
| /..fo |
|
|
| /fo.xyz |
|
|
| /fo.exe |
|
|
When user "Alice" deletes the following files with original path from the trashbin
|
|
| path |
|
|
| /fo. |
|
|
| /fo.1 |
|
|
| /fo...1.. |
|
|
| /... |
|
|
| /..fo |
|
|
| /fo.xyz |
|
|
| /fo.exe |
|
|
Then the HTTP status code of responses on all endpoints should be "204"
|
|
And as "Alice" the folders with following original paths should not exist in the trashbin
|
|
| path |
|
|
| /fo. |
|
|
| /fo.1 |
|
|
| /fo...1.. |
|
|
| /... |
|
|
| /..fo |
|
|
| /fo.xyz |
|
|
| /fo.exe |
|
|
Examples:
|
|
| dav-path-version |
|
|
| new |
|
|
| spaces |
|