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
126 lines
6.1 KiB
Gherkin
126 lines
6.1 KiB
Gherkin
Feature: delete file/folder
|
|
As a user
|
|
I want to delete a file or folder
|
|
So that I can remove redundant resources
|
|
|
|
Background:
|
|
Given these users have been created with default attributes:
|
|
| username |
|
|
| Alice |
|
|
| Brian |
|
|
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
|
|
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
|
|
And user "Alice" has created folder "/PARENT"
|
|
And user "Alice" has created folder "/FOLDER"
|
|
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
|
|
|
|
|
|
Scenario: send DELETE requests to webDav endpoints as normal user with wrong password
|
|
When user "Alice" requests these endpoints with "DELETE" using password "invalid" about user "Alice"
|
|
| endpoint |
|
|
| /webdav/textfile0.txt |
|
|
| /dav/files/%username%/textfile0.txt |
|
|
| /webdav/PARENT |
|
|
| /dav/files/%username%/PARENT |
|
|
| /webdav/PARENT/parent.txt |
|
|
| /dav/files/%username%/PARENT/parent.txt |
|
|
| /dav/spaces/%spaceid%/textfile0.txt |
|
|
| /dav/spaces/%spaceid%/PARENT |
|
|
| /dav/spaces/%spaceid%/PARENT/parent.txt |
|
|
Then the HTTP status code of responses on all endpoints should be "401"
|
|
|
|
|
|
Scenario: send DELETE requests to webDav endpoints as normal user with no password
|
|
When user "Alice" requests these endpoints with "DELETE" using password "" about user "Alice"
|
|
| endpoint |
|
|
| /webdav/textfile0.txt |
|
|
| /dav/files/%username%/textfile0.txt |
|
|
| /webdav/PARENT |
|
|
| /dav/files/%username%/PARENT |
|
|
| /webdav/PARENT/parent.txt |
|
|
| /dav/files/%username%/PARENT/parent.txt |
|
|
| /dav/spaces/%spaceid%/textfile0.txt |
|
|
| /dav/spaces/%spaceid%/PARENT |
|
|
| /dav/spaces/%spaceid%/PARENT/parent.txt |
|
|
Then the HTTP status code of responses on all endpoints should be "401"
|
|
|
|
|
|
Scenario: send DELETE requests to another user's webDav endpoints as normal user
|
|
When user "Brian" requests these endpoints with "DELETE" about user "Alice"
|
|
| endpoint |
|
|
| /dav/files/%username%/textfile0.txt |
|
|
| /dav/files/%username%/PARENT |
|
|
| /dav/files/%username%/PARENT/parent.txt |
|
|
Then the HTTP status code of responses on all endpoints should be "404"
|
|
|
|
|
|
Scenario: send DELETE requests to another user's webDav endpoints as normal user using the spaces WebDAV API
|
|
When user "Brian" requests these endpoints with "DELETE" about user "Alice"
|
|
| endpoint |
|
|
| /dav/spaces/%spaceid%/textfile0.txt |
|
|
| /dav/spaces/%spaceid%/PARENT |
|
|
| /dav/spaces/%spaceid%/PARENT/parent.txt |
|
|
Then the HTTP status code of responses on all endpoints should be "404"
|
|
|
|
|
|
Scenario: send DELETE requests to webDav endpoints using invalid username but correct password
|
|
When user "usero" requests these endpoints with "DELETE" using the password of user "Alice"
|
|
| endpoint |
|
|
| /webdav/textfile0.txt |
|
|
| /dav/files/%username%/textfile0.txt |
|
|
| /webdav/PARENT |
|
|
| /dav/files/%username%/PARENT |
|
|
| /dav/files/%username%/PARENT/parent.txt |
|
|
| /dav/spaces/%spaceid%/textfile0.txt |
|
|
| /dav/spaces/%spaceid%/PARENT |
|
|
| /dav/spaces/%spaceid%/PARENT/parent.txt |
|
|
Then the HTTP status code of responses on all endpoints should be "401"
|
|
|
|
|
|
Scenario: send DELETE requests to webDav endpoints using valid password and username of different user
|
|
When user "Brian" requests these endpoints with "DELETE" using the password of user "Alice"
|
|
| endpoint |
|
|
| /webdav/textfile0.txt |
|
|
| /dav/files/%username%/textfile0.txt |
|
|
| /webdav/PARENT |
|
|
| /dav/files/%username%/PARENT |
|
|
| /dav/files/%username%/PARENT/parent.txt |
|
|
| /dav/spaces/%spaceid%/textfile0.txt |
|
|
| /dav/spaces/%spaceid%/PARENT |
|
|
| /dav/spaces/%spaceid%/PARENT/parent.txt |
|
|
Then the HTTP status code of responses on all endpoints should be "401"
|
|
|
|
|
|
Scenario: send DELETE requests to webDav endpoints without any authentication
|
|
When a user requests these endpoints with "DELETE" with no authentication about user "Alice"
|
|
| endpoint |
|
|
| /webdav/textfile0.txt |
|
|
| /dav/files/%username%/textfile0.txt |
|
|
| /webdav/PARENT |
|
|
| /dav/files/%username%/PARENT |
|
|
| /dav/files/%username%/PARENT/parent.txt |
|
|
| /dav/spaces/%spaceid%/textfile0.txt |
|
|
| /dav/spaces/%spaceid%/PARENT |
|
|
| /dav/spaces/%spaceid%/PARENT/parent.txt |
|
|
Then the HTTP status code of responses on all endpoints should be "401"
|
|
|
|
@issue-4332
|
|
Scenario: send DELETE requests to webDav endpoints with body as normal user
|
|
When user "Alice" requests these endpoints with "DELETE" including body "doesnotmatter" about user "Alice"
|
|
| endpoint |
|
|
| /webdav/textfile0.txt |
|
|
| /dav/files/%username%/textfile1.txt |
|
|
| /dav/files/%username%/PARENT/parent.txt |
|
|
| /webdav/PARENT |
|
|
| /dav/files/%username%/FOLDER |
|
|
Then the HTTP status code of responses on all endpoints should be "415"
|
|
|
|
@issue-4332
|
|
Scenario: send DELETE requests to webDav endpoints with body as normal user using the spaces WebDAV API
|
|
When user "Alice" requests these endpoints with "DELETE" including body "doesnotmatter" about user "Alice"
|
|
| endpoint |
|
|
| /dav/spaces/%spaceid%/textfile0.txt |
|
|
| /dav/spaces/%spaceid%/PARENT/parent.txt |
|
|
| /dav/spaces/%spaceid%/PARENT |
|
|
Then the HTTP status code of responses on all endpoints should be "415"
|