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
131 lines
6.7 KiB
Gherkin
131 lines
6.7 KiB
Gherkin
Feature: set file properties
|
|
As a user
|
|
I want to be able to set meta-information about files
|
|
So that I can record file meta-information (detailed requirement TBD)
|
|
|
|
Background:
|
|
Given using OCS API version "1"
|
|
And user "Alice" has been created with default attributes
|
|
|
|
@issue-1263
|
|
Scenario Outline: setting custom DAV property and reading it
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "testcustomprop.txt"
|
|
When user "Alice" sets property "very-custom-prop" of file "testcustomprop.txt" to "veryCustomPropValue"
|
|
Then the HTTP status code should be "207"
|
|
And the xml response should contain a property "very-custom-prop"
|
|
And the content in the response should include the following content:
|
|
"""
|
|
<d:prop><very-custom-prop></very-custom-prop></d:prop>
|
|
"""
|
|
When user "Alice" gets a custom property "very-custom-prop" of file "testcustomprop.txt"
|
|
Then the HTTP status code should be "207"
|
|
And the response should contain a custom "very-custom-prop" property with value "veryCustomPropValue"
|
|
And the content in the response should include the following content:
|
|
"""
|
|
<d:prop><very-custom-prop>veryCustomPropValue</very-custom-prop></d:prop>
|
|
"""
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
@issue-1297
|
|
Scenario Outline: setting custom complex DAV property and reading it
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/testcustomprop.txt"
|
|
When user "Alice" sets property "very-custom-prop" of file "testcustomprop.txt" to "<foo xmlns='http://bar'/>"
|
|
Then the HTTP status code should be "207"
|
|
And the xml response should contain a property "very-custom-prop"
|
|
When user "Alice" gets a custom property "very-custom-prop" of file "testcustomprop.txt"
|
|
Then the HTTP status code should be "207"
|
|
And the response should contain a custom "very-custom-prop" property with value "<foo xmlns='http://bar'/>"
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
@issue-1263
|
|
Scenario Outline: setting custom DAV property and reading it after the file is renamed
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/testcustompropwithmove.txt"
|
|
And user "Alice" has set property "very-custom-prop" of file "testcustompropwithmove.txt" to "valueForMovetest"
|
|
And user "Alice" has moved file "/testcustompropwithmove.txt" to "/catchmeifyoucan.txt"
|
|
When user "Alice" gets a custom property "very-custom-prop" of file "catchmeifyoucan.txt"
|
|
Then the response should contain a custom "very-custom-prop" property with value "valueForMovetest"
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
@skipOnReva @issue-1297
|
|
Scenario Outline: setting custom DAV property on a shared file as an owner and reading as a recipient
|
|
Given using <dav-path-version> DAV path
|
|
And user "Brian" has been created with default attributes
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/testcustompropshared.txt"
|
|
And user "Alice" has sent the following resource share invitation:
|
|
| resource | testcustompropshared.txt |
|
|
| space | Personal |
|
|
| sharee | Brian |
|
|
| shareType | user |
|
|
| permissionsRole | File Editor |
|
|
And user "Brian" has a share "testcustompropshared.txt" synced
|
|
When user "Alice" sets property "very-custom-prop" of file "testcustompropshared.txt" to "valueForSharetest"
|
|
Then the HTTP status code should be "207"
|
|
And the xml response should contain a property "very-custom-prop"
|
|
When user "Brian" gets a custom property "very-custom-prop" of file "Shares/testcustompropshared.txt"
|
|
Then the HTTP status code should be "207"
|
|
And the response should contain a custom "very-custom-prop" property with value "valueForSharetest"
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
@issue-1263
|
|
Scenario Outline: setting custom DAV property using one endpoint and reading it with other endpoint
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/testnewold.txt"
|
|
When user "Alice" sets property "very-custom-prop" of file "testnewold.txt" to "lucky"
|
|
Then the HTTP status code should be "207"
|
|
And the xml response should contain a property "very-custom-prop"
|
|
And using <dav-path-version-2> DAV path
|
|
When user "Alice" gets a custom property "very-custom-prop" of file "testnewold.txt"
|
|
Then the HTTP status code should be "207"
|
|
And the response should contain a custom "very-custom-prop" property with value "lucky"
|
|
Examples:
|
|
| dav-path-version | dav-path-version-2 |
|
|
| old | new |
|
|
| new | old |
|
|
| spaces | new |
|
|
| spaces | old |
|
|
| new | spaces |
|
|
| old | spaces |
|
|
|
|
@issue-2140
|
|
Scenario Outline: setting custom DAV property with custom namespace and reading it
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "testcustomprop.txt"
|
|
When user "Alice" sets property "very-custom-prop" with namespace "x1='http://whatever.org/ns'" of file "testcustomprop.txt" to "veryCustomPropValue" using the WebDAV API
|
|
Then the HTTP status code should be "207"
|
|
And the xml response should contain a property "x1:very-custom-prop" with namespace "x1='http://whatever.org/ns'"
|
|
And the content in the response should include the following content:
|
|
"""
|
|
<d:prop><x1:very-custom-prop xmlns:x1="http://whatever.org/ns"></x1:very-custom-prop></d:prop>
|
|
"""
|
|
When user "Alice" gets a custom property "x1:very-custom-prop" with namespace "x1='http://whatever.org/ns'" of file "testcustomprop.txt"
|
|
Then the HTTP status code should be "207"
|
|
And the response should contain a custom "x1:very-custom-prop" property with namespace "x1='http://whatever.org/ns'" and value "veryCustomPropValue"
|
|
And the content in the response should include the following content:
|
|
"""
|
|
<d:prop><x1:very-custom-prop xmlns:x1="http://whatever.org/ns">veryCustomPropValue</x1:very-custom-prop></d:prop>
|
|
"""
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|