mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 12:19:37 -06:00
[tests-only] Added tests with depth:infinity enabled (#7395)
* add depth infinity tests * fix step * add passing tests only * format rable
This commit is contained in:
@@ -114,6 +114,7 @@ config = {
|
||||
"apiDownloads",
|
||||
"apiReshare",
|
||||
"apiSpacesDavOperation",
|
||||
"apiDepthInfinity",
|
||||
],
|
||||
"skip": False,
|
||||
},
|
||||
|
||||
@@ -130,6 +130,19 @@ default:
|
||||
- GraphContext:
|
||||
- OcisConfigContext:
|
||||
|
||||
apiDepthInfinity:
|
||||
paths:
|
||||
- '%paths.base%/../features/apiDepthInfinity'
|
||||
context: *common_ldap_suite_context
|
||||
contexts:
|
||||
- SpacesContext:
|
||||
- FeatureContext: *common_feature_context_params
|
||||
- OCSContext:
|
||||
- GraphContext:
|
||||
- PublicWebDavContext:
|
||||
- TrashbinContext:
|
||||
- OcisConfigContext:
|
||||
|
||||
apiAsyncUpload:
|
||||
paths:
|
||||
- '%paths.base%/../features/apiAsyncUpload'
|
||||
|
||||
114
tests/acceptance/features/apiDepthInfinity/propfind.feature
Normal file
114
tests/acceptance/features/apiDepthInfinity/propfind.feature
Normal file
@@ -0,0 +1,114 @@
|
||||
@env-config
|
||||
Feature: PROPFIND with depth:infinity
|
||||
As a user
|
||||
I want to retrieve all properties of a resource
|
||||
So that I can get the information about a resource
|
||||
|
||||
Background:
|
||||
Given the config "OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY" has been set to "true"
|
||||
And user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created the following folders
|
||||
| path |
|
||||
| simple-folder |
|
||||
| simple-folder/simple-folder1 |
|
||||
| simple-folder/simple-empty-folder |
|
||||
| simple-folder/simple-folder1/simple-folder2 |
|
||||
And user "Alice" has uploaded the following files with content "simple-test-content"
|
||||
| path |
|
||||
| textfile0.txt |
|
||||
| welcome.txt |
|
||||
| simple-folder/textfile0.txt |
|
||||
| simple-folder/welcome.txt |
|
||||
| simple-folder/simple-folder1/textfile0.txt |
|
||||
| simple-folder/simple-folder1/welcome.txt |
|
||||
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
|
||||
| simple-folder/simple-folder1/simple-folder2/welcome.txt |
|
||||
|
||||
|
||||
Scenario Outline: get the list of resources with depth infinity
|
||||
Given using <dav-path-version> DAV path
|
||||
When user "Alice" lists the resources in "/" with depth "infinity" using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the last DAV response for user "Alice" should contain these nodes
|
||||
| name |
|
||||
| textfile0.txt |
|
||||
| welcome.txt |
|
||||
| simple-folder/ |
|
||||
| simple-folder/textfile0.txt |
|
||||
| simple-folder/welcome.txt |
|
||||
| simple-folder/simple-empty-folder/ |
|
||||
| simple-folder/simple-folder1/ |
|
||||
| simple-folder/simple-folder1/simple-folder2 |
|
||||
| simple-folder/simple-folder1/textfile0.txt |
|
||||
| simple-folder/simple-folder1/welcome.txt |
|
||||
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
|
||||
| simple-folder/simple-folder1/simple-folder2/welcome.txt |
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
|
||||
Scenario Outline: get the list of resources of a folder with depth infinity
|
||||
Given using <dav-path-version> DAV path
|
||||
When user "Alice" lists the resources in "simple-folder" with depth "infinity" using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the last DAV response for user "Alice" should contain these nodes
|
||||
| name |
|
||||
| simple-folder/textfile0.txt |
|
||||
| simple-folder/welcome.txt |
|
||||
| simple-folder/simple-folder1/ |
|
||||
| simple-folder/simple-folder1/simple-folder2 |
|
||||
| simple-folder/simple-folder1/textfile0.txt |
|
||||
| simple-folder/simple-folder1/welcome.txt |
|
||||
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
|
||||
| simple-folder/simple-folder1/simple-folder2/welcome.txt |
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
|
||||
Scenario: get the list of resources in a folder shared through public link with depth infinity
|
||||
Given using new DAV path
|
||||
And user "Alice" has created a public link share of folder "simple-folder"
|
||||
When the public lists the resources in the last created public link with depth "infinity" using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the last public link DAV response should contain these nodes
|
||||
| name |
|
||||
| textfile0.txt |
|
||||
| welcome.txt |
|
||||
| simple-folder1/ |
|
||||
| simple-folder1/welcome.txt |
|
||||
| simple-folder1/simple-folder2 |
|
||||
| simple-folder1/textfile0.txt |
|
||||
| simple-folder1/simple-folder2/textfile0.txt |
|
||||
| simple-folder1/simple-folder2/welcome.txt |
|
||||
|
||||
|
||||
Scenario Outline: get the list of files in the trashbin with depth infinity
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has deleted the following resources
|
||||
| path |
|
||||
| textfile0.txt |
|
||||
| welcome.txt |
|
||||
| simple-folder/ |
|
||||
When user "Alice" lists the resources in the trashbin with depth "infinity" using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the trashbin DAV response should contain these nodes
|
||||
| name |
|
||||
| textfile0.txt |
|
||||
| welcome.txt |
|
||||
| simple-folder/ |
|
||||
| simple-folder/textfile0.txt |
|
||||
| simple-folder/welcome.txt |
|
||||
| simple-folder/simple-folder1/textfile0.txt |
|
||||
| simple-folder/simple-folder1/welcome.txt |
|
||||
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
|
||||
| simple-folder/simple-folder1/simple-folder2/welcome.txt |
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| new |
|
||||
| spaces |
|
||||
@@ -20,19 +20,23 @@ Feature: PROPFIND
|
||||
|
||||
Scenario Outline: send PROPFIND request to "/remote.php/dav/(files|spaces)" with depth header
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
When user "Alice" requests "<dav_path>" with "PROPFIND" using basic auth and with headers
|
||||
When user "Alice" requests "<dav-path>" with "PROPFIND" using basic auth and with headers
|
||||
| header | value |
|
||||
| depth | <depth> |
|
||||
Then the HTTP status code should be "207"
|
||||
Then the HTTP status code should be "<http-code>"
|
||||
Examples:
|
||||
| dav_path | depth |
|
||||
| /remote.php/dav/files/alice | 0 |
|
||||
| /remote.php/dav/files/alice | infinity |
|
||||
| dav-path | depth | http-code |
|
||||
| /remote.php/webdav | 0 | 207 |
|
||||
| /remote.php/webdav | 1 | 207 |
|
||||
| /remote.php/dav/files/alice | 0 | 207 |
|
||||
| /remote.php/dav/files/alice | 1 | 207 |
|
||||
|
||||
@skipOnRevaMaster
|
||||
Examples:
|
||||
| dav_path | depth |
|
||||
| /remote.php/dav/spaces/%spaceid% | 0 |
|
||||
| dav-path | depth | http-code |
|
||||
| /remote.php/dav/spaces/%spaceid% | 0 | 207 |
|
||||
| /remote.php/dav/spaces/%spaceid% | 1 | 207 |
|
||||
| /remote.php/dav/spaces/%spaceid% | infinity | 400 |
|
||||
|
||||
|
||||
Scenario: send PROPFIND request to a public link
|
||||
|
||||
Reference in New Issue
Block a user