mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-11-27 10:34:42 -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
289 lines
12 KiB
Gherkin
289 lines
12 KiB
Gherkin
Feature: create files and folder
|
|
As a user
|
|
I want to be able to create files and folders
|
|
So that I can organise the files in my file system
|
|
|
|
Background:
|
|
Given using OCS API version "1"
|
|
And user "Alice" has been created with default attributes
|
|
|
|
|
|
Scenario Outline: create a folder
|
|
Given using <dav-path-version> DAV path
|
|
When user "Alice" creates folder <folder-name> using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And as "Alice" folder <folder-name> should exist
|
|
Examples:
|
|
| dav-path-version | folder-name |
|
|
| old | "upload" |
|
|
| old | "strängé folder" |
|
|
| old | "C++ folder.cpp" |
|
|
| old | "नेपाली" |
|
|
| old | "folder #2" |
|
|
| old | "folder ?2" |
|
|
| old | "😀 🤖" |
|
|
| old | "new&folder" |
|
|
| old | "Sample,comma" |
|
|
| old | "'single'" |
|
|
| old | '"double"' |
|
|
| new | "upload" |
|
|
| new | "strängé folder" |
|
|
| new | "C++ folder.cpp" |
|
|
| new | "नेपाली" |
|
|
| new | "folder #2" |
|
|
| new | "folder ?2" |
|
|
| new | "😀 🤖" |
|
|
| new | "new&folder" |
|
|
| new | "Sample,comma" |
|
|
| new | "'single'" |
|
|
| new | '"double"' |
|
|
| new | "नेपाली" |
|
|
| spaces | "upload" |
|
|
| spaces | "strängé folder" |
|
|
| spaces | "C++ folder.cpp" |
|
|
| spaces | "नेपाली" |
|
|
| spaces | "folder #2" |
|
|
| spaces | "folder ?2" |
|
|
| spaces | "😀 🤖" |
|
|
| spaces | "new&folder" |
|
|
| spaces | "Sample,comma" |
|
|
| spaces | "'single'" |
|
|
| spaces | '"double"' |
|
|
|
|
|
|
Scenario Outline: get resourcetype property of a folder
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has created folder "/test_folder"
|
|
When user "Alice" gets the following properties of folder "/test_folder" using the WebDAV API
|
|
| propertyName |
|
|
| d:resourcetype |
|
|
Then the HTTP status code should be "207"
|
|
And the single response should contain a property "d:resourcetype" with a child property "d:collection"
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
|
|
Scenario Outline: get resourcetype property of a folder with special chars
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has created folder "/test_folder:5"
|
|
When user "Alice" gets the following properties of folder "/test_folder:5" using the WebDAV API
|
|
| propertyName |
|
|
| d:resourcetype |
|
|
Then the HTTP status code should be "207"
|
|
And the single response should contain a property "d:resourcetype" with a child property "d:collection"
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
@issue-1345 @issue-2177
|
|
Scenario Outline: creating a directory which contains .part should not be possible
|
|
Given using <dav-path-version> DAV path
|
|
When user "Alice" creates folder "/folder.with.ext.part" using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And as "Alice" folder "folder.with.ext.part" should exist
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
@issue-1283
|
|
Scenario Outline: try to create a folder that already exists
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has created folder "my-data"
|
|
When user "Alice" creates folder "my-data" using the WebDAV API
|
|
Then the HTTP status code should be "405"
|
|
And as "Alice" folder "my-data" should exist
|
|
And the DAV exception should be "Sabre\DAV\Exception\MethodNotAllowed"
|
|
And the DAV message should be "The resource you tried to create already exists"
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
@issue-1283
|
|
Scenario Outline: try to create a folder with a name of an existing file
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" has uploaded file with content "uploaded data" to "/my-data.txt"
|
|
When user "Alice" creates folder "my-data.txt" using the WebDAV API
|
|
Then the HTTP status code should be "405"
|
|
And the DAV exception should be "Sabre\DAV\Exception\MethodNotAllowed"
|
|
And the DAV message should be "The resource you tried to create already exists"
|
|
And the content of file "/my-data.txt" for user "Alice" should be "uploaded data"
|
|
Examples:
|
|
| dav-path-version |
|
|
| old |
|
|
| new |
|
|
| spaces |
|
|
|
|
@issue-web-1893
|
|
Scenario Outline: create a file
|
|
Given using <dav-path-version> DAV path
|
|
When user "Alice" uploads file with content "some text" to <file-name> using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And as "Alice" file <file-name> should exist
|
|
And the content of file <file-name> for user "Alice" should be "some text"
|
|
Examples:
|
|
| dav-path-version | file-name |
|
|
| old | "upload.txt" |
|
|
| old | "strängéfile.txt" |
|
|
| old | "C++ file.cpp" |
|
|
| old | "नेपाली" |
|
|
| old | "file #2.txt" |
|
|
| old | "file ?2.pdf" |
|
|
| old | "😀 🤖.txt" |
|
|
| old | "new&file.txt" |
|
|
| old | "Sample,comma.txt" |
|
|
| old | "'single'.txt" |
|
|
| old | '"double".txt' |
|
|
| new | "upload.txt" |
|
|
| new | "strängéfile.txt" |
|
|
| new | "C++ file.cpp" |
|
|
| new | "नेपाली" |
|
|
| new | "file #2.txt" |
|
|
| new | "file ?2.pdf" |
|
|
| new | "😀 🤖.txt" |
|
|
| new | "new&file.txt" |
|
|
| new | "Sample,comma.txt" |
|
|
| new | "'single'.txt" |
|
|
| new | '"double".txt' |
|
|
| spaces | "upload.txt" |
|
|
| spaces | "strängéfile.txt" |
|
|
| spaces | "C++ file.cpp" |
|
|
| spaces | "नेपाली" |
|
|
| spaces | "file #2.txt" |
|
|
| spaces | "file ?2.pdf" |
|
|
| spaces | "😀 🤖.txt" |
|
|
| spaces | "new&file.txt" |
|
|
| spaces | "Sample,comma.txt" |
|
|
| spaces | "'single'.txt" |
|
|
| spaces | '"double".txt' |
|
|
|
|
@issue-10339 @issue-9568
|
|
Scenario Outline: try to create file with '.', '..' and 'empty'
|
|
Given using <dav-path-version> DAV path
|
|
When user "Alice" uploads file with content "some text" to "<file-name>" using the WebDAV API
|
|
Then the HTTP status code should be "<http-status-code>"
|
|
Examples:
|
|
| dav-path-version | file-name | http-status-code |
|
|
| old | /. | 400 |
|
|
| old | /.. | 404 |
|
|
| old | /../lorem | 404 |
|
|
| old | | 400 |
|
|
| new | /. | 400 |
|
|
| new | /.. | 405 |
|
|
| new | /../lorem | 400 |
|
|
| new | | 400 |
|
|
| spaces | /. | 400 |
|
|
| spaces | /.. | 405 |
|
|
| spaces | /../lorem | 400 |
|
|
| spaces | | 400 |
|
|
|
|
@issue-10339 @issue-9568
|
|
Scenario Outline: try to create folder with '.', '..' and 'empty'
|
|
Given using <dav-path-version> DAV path
|
|
When user "Alice" creates folder "<folder-name>" using the WebDAV API
|
|
Then the HTTP status code should be "<http-status-code>"
|
|
Examples:
|
|
| dav-path-version | folder-name | http-status-code |
|
|
| old | /. | 400 |
|
|
| old | /.. | 404 |
|
|
| old | /../lorem | 404 |
|
|
| old | | 400 |
|
|
| new | /. | 400 |
|
|
| new | /.. | 405 |
|
|
| new | /../lorem | 400 |
|
|
| new | | 400 |
|
|
| spaces | /. | 400 |
|
|
| spaces | /.. | 405 |
|
|
| spaces | /../lorem | 400 |
|
|
| spaces | | 400 |
|
|
|
|
|
|
Scenario Outline: try to create folder with backslash
|
|
Given using <dav-path-version> DAV path
|
|
When user "Alice" creates folder "<folder-name>" using the WebDAV API
|
|
Then the HTTP status code should be "400"
|
|
Examples:
|
|
| dav-path-version | folder-name |
|
|
| old | with\backslash |
|
|
| new | with\backslash |
|
|
| spaces | with\backslash |
|
|
|
|
|
|
Scenario Outline: try to create file with backslash
|
|
Given using <dav-path-version> DAV path
|
|
When user "Alice" uploads file with content "some text" to "<file-name>" using the WebDAV API
|
|
Then the HTTP status code should be "400"
|
|
Examples:
|
|
| dav-path-version | file-name |
|
|
| old | with\backslash |
|
|
| new | with\backslash |
|
|
| spaces | with\backslash |
|
|
|
|
|
|
Scenario Outline: create a file with dots in the name
|
|
Given using <dav-path-version> DAV path
|
|
And user "Alice" uploads file with content "some text" to "<file-name>" using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And the content of file "<file-name>" for user "Alice" should be "some text"
|
|
Examples:
|
|
| dav-path-version | file-name |
|
|
| old | /fo. |
|
|
| old | /fo.1 |
|
|
| old | /fo...1.. |
|
|
| old | /... |
|
|
| old | /..fo |
|
|
| old | /fo.xyz |
|
|
| old | /fo.exe |
|
|
| new | /fo. |
|
|
| new | /fo.1 |
|
|
| new | /fo...1.. |
|
|
| new | /... |
|
|
| new | /..fo |
|
|
| new | /fo.xyz |
|
|
| new | /fo.exe |
|
|
| spaces | /fo. |
|
|
| spaces | /fo.1 |
|
|
| spaces | /fo...1.. |
|
|
| spaces | /... |
|
|
| spaces | /..fo |
|
|
| spaces | /fo.xyz |
|
|
| spaces | /fo.exe |
|
|
|
|
|
|
Scenario Outline: create a folder with dots in the name
|
|
Given using <dav-path-version> DAV path
|
|
When user "Alice" creates folder "<folder-name>" using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And as "Alice" folder "<folder-name>" should exist
|
|
Examples:
|
|
| dav-path-version | folder-name |
|
|
| old | /fo. |
|
|
| old | /fo.1 |
|
|
| old | /fo...1.. |
|
|
| old | /... |
|
|
| old | /..fo |
|
|
| old | /fo.xyz |
|
|
| old | /fo.exe |
|
|
| new | /fo. |
|
|
| new | /fo.1 |
|
|
| new | /fo...1.. |
|
|
| new | /... |
|
|
| new | /..fo |
|
|
| new | /fo.xyz |
|
|
| new | /fo.exe |
|
|
| spaces | /fo. |
|
|
| spaces | /fo.1 |
|
|
| spaces | /fo...1.. |
|
|
| spaces | /... |
|
|
| spaces | /..fo |
|
|
| spaces | /fo.xyz |
|
|
| spaces | /fo.exe |
|