[tests-only] Run tests with default propfind depth infinity config (#7334)

* use default config for OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY

* remove unnecessary steps

* use default propfind depth infinity value

* use correct step to check the resources

* use correct step to check the resources

* cover depth:infinity enabled test cases

* fix steps

* fix scenario steps

* update expected failure list

* add depth infinity test suite to ci

* update existing tests only

* remove test with depth:infinity
This commit is contained in:
Sawjan Gurung
2023-10-03 09:26:31 +05:45
committed by GitHub
parent 87f1235562
commit c59b597984
14 changed files with 142 additions and 311 deletions

View File

@@ -1965,7 +1965,6 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
if deploy_type == "":
environment["FRONTEND_OCS_ENABLE_DENIALS"] = True
environment["OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY"] = True
# fonts map for txt thumbnails (including unicode support)
environment["THUMBNAILS_TXT_FONTMAP_FILE"] = "%s/tests/config/drone/fontsMap.json" % (dirs["base"])

View File

@@ -191,7 +191,7 @@ class WebDavHelper {
?string $path,
?array $properties,
?string $xRequestId = '',
?string $folderDepth = '0',
?string $folderDepth = '1',
?string $type = "files",
?int $davPathVersionToUse = self::DAV_VERSION_NEW,
?string $doDavRequestAsUser = null
@@ -199,7 +199,10 @@ class WebDavHelper {
$body = self::getBodyForPropfind($properties);
$folderDepth = (string) $folderDepth;
if ($folderDepth !== '0' && $folderDepth !== '1' && $folderDepth !== 'infinity') {
throw new InvalidArgumentException('Invalid depth value ' . $folderDepth);
if ($folderDepth !== '') {
throw new InvalidArgumentException('Invalid depth value ' . $folderDepth);
}
$folderDepth = '1'; // oCIS server's default value
}
$headers['Depth'] = $folderDepth;
return self::makeDavRequest(

View File

@@ -7,6 +7,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
Basic file management like up and download, move, copy, properties, trash, versions and chunking.
#### [copy personal space file to shared folder root result share in decline state](https://github.com/owncloud/ocis/issues/6999)
- [coreApiWebdavProperties1/copyFile.feature:289](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties1/copyFile.feature#L289)
- [coreApiWebdavProperties1/copyFile.feature:290](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties1/copyFile.feature#L290)
@@ -594,17 +595,6 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
- [coreApiFavorites/favorites.feature:150](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L150)
- [coreApiFavorites/favorites.feature:227](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L227)
#### [Cannot disable the dav propfind depth infinity for resources](https://github.com/owncloud/ocis/issues/3720)
- [coreApiWebdavOperations/listFiles.feature:354](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/listFiles.feature#L354)
- [coreApiWebdavOperations/listFiles.feature:355](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/listFiles.feature#L355)
- [coreApiWebdavOperations/listFiles.feature:360](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/listFiles.feature#L360)
- [coreApiWebdavOperations/listFiles.feature:374](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/listFiles.feature#L374)
- [coreApiWebdavOperations/listFiles.feature:379](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/listFiles.feature#L379)
- [coreApiWebdavOperations/listFiles.feature:393](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/listFiles.feature#L393)
- [coreApiWebdavOperations/listFiles.feature:394](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/listFiles.feature#L394)
- [coreApiWebdavOperations/listFiles.feature:399](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/listFiles.feature#L399)
#### [OCS status code zero](https://github.com/owncloud/ocis/issues/3621)
- [coreApiShareManagementToShares/moveReceivedShare.feature:13](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/moveReceivedShare.feature#L13)

View File

@@ -229,8 +229,8 @@ Feature: antivirus
And user "Alice" should get a notification for resource "<newfilename>" with subject "Virus found" and message:
| message |
| Virus found in <newfilename>. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
And for user "Alice" the space "new-space" should not contain these entries:
| /uploadFolder/<newfilename> |
And for user "Alice" folder "uploadFolder" of the space "new-space" should not contain these entries:
| <newfilename> |
When user "Alice" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/<newfilename>" in space "new-space" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should get a notification for resource "<newfilename>" with subject "Virus found" and message:

View File

@@ -224,8 +224,6 @@ Feature: Change data of space
}
}
"""
And for user "Alice" folder ".space/" of the space "Project Jupiter" should contain these entries:
| readme.md |
And for user "Alice" the content of the file ".space/readme.md" of the space "Project Jupiter" should be "space description"
@@ -235,8 +233,6 @@ Feature: Change data of space
And user "Alice" has set the file ".space/readme.md" as a description in a special section of the "Project Jupiter" space
When user "<user>" uploads a file inside space "Project Jupiter" with content "new description" to ".space/readme.md" using the WebDAV API
Then the HTTP status code should be "<code>"
And for user "<user>" folder ".space/" of the space "Project Jupiter" should contain these entries:
| readme.md |
And for user "<user>" the content of the file ".space/readme.md" of the space "Project Jupiter" should be "<content>"
Examples:
| user | code | content |

View File

@@ -14,9 +14,10 @@ Feature: copying file using file id
And we save it into "FILEID"
When user "Alice" copies a file "/textfile.txt" into "/folder" inside space "Personal" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| folder/textfile.txt |
| textfile.txt |
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| textfile.txt |
Examples:
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |
@@ -30,9 +31,10 @@ Feature: copying file using file id
And we save it into "FILEID"
When user "Alice" copies a file "/textfile.txt" into "/folder/sub-folder" inside space "Personal" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| folder/sub-folder/textfile.txt |
| textfile.txt |
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
| textfile.txt |
Examples:
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |
@@ -45,9 +47,10 @@ Feature: copying file using file id
And we save it into "FILEID"
When user "Alice" copies a file "folder/textfile.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| textfile.txt |
| folder/textfile.txt |
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder" of the space "Personal" should contain these files:
| textfile.txt |
Examples:
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |
@@ -61,9 +64,10 @@ Feature: copying file using file id
And we save it into "FILEID"
When user "Alice" copies a file "folder/sub-folder/textfile.txt" into "/" inside space "Personal" using file-id path "<dav-path>"
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| textfile.txt |
| folder/sub-folder/textfile.txt |
And for user "Alice" folder "/" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "folder/sub-folder" of the space "Personal" should contain these files:
| textfile.txt |
Examples:
| dav-path |
| /remote.php/dav/spaces/<<FILEID>> |

View File

@@ -21,8 +21,8 @@ Feature: copy file
| role | <role> |
When user "Brian" copies file "/insideSpace.txt" to "/newfolder/insideSpace.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Brian" the space "Project" should contain these entries:
| /newfolder/insideSpace.txt |
And for user "Brian" folder "newfolder" of the space "Project" should contain these files:
| insideSpace.txt |
And for user "Alice" the content of the file "/newfolder/insideSpace.txt" of the space "Project" should be "some content"
Examples:
| role |
@@ -40,8 +40,8 @@ Feature: copy file
| role | viewer |
When user "Brian" copies file "/insideSpace.txt" to "/newfolder/insideSpace.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Brian" the space "Project" should not contain these entries:
| /newfolder/insideSpace.txt |
And for user "Brian" folder "newfolder" of the space "Project" should not contain these files:
| insideSpace.txt |
Scenario Outline: user copies a file from a project space with a different role to a project space with the manager role
@@ -142,8 +142,8 @@ Feature: copy file
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares" should not contain these entries:
| /testshare/project.txt |
And for user "Alice" folder "testshare" of the space "Shares" should not contain these files:
| project.txt |
Examples:
| role |
| manager |
@@ -201,8 +201,8 @@ Feature: copy file
And user "Alice" has uploaded file with content "personal content" to "/personal.txt"
When user "Alice" copies file "/personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares" should not contain these entries:
| /testshare/personal.txt |
And for user "Alice" folder "testshare" of the space "Shares" should not contain these files:
| personal.txt |
Scenario Outline: user copies a file from share space with different role to personal space
@@ -277,8 +277,8 @@ Feature: copy file
Then the HTTP status code should be "201"
And for user "Alice" folder "testshare2" of the space "Shares" should contain these files:
| /testshare1.txt |
And for user "Brian" the space "Personal" should contain these entries:
| /testshare2/testshare1.txt |
And for user "Brian" folder "testshare2" of the space "Personal" should contain these files:
| /testshare1.txt |
And for user "Alice" the content of the file "/testshare2/testshare1.txt" of the space "Shares" should be "testshare1 content"
And for user "Brian" the content of the file "/testshare1/testshare1.txt" of the space "Personal" should be "testshare1 content"
Examples:
@@ -297,10 +297,10 @@ Feature: copy file
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" copies file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Alice" folder "testshare2" of the space "Shares" should not contain these files:
| testshare1.txt |
And for user "Brian" folder "testshare2" of the space "Personal" should not contain these files:
| testshare1.txt |
Examples:
| permissions |
| 31 |
@@ -318,13 +318,13 @@ Feature: copy file
| role | <role> |
When user "Brian" copies folder "/folder2" to "/folder1/folder2" inside space "Project" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Brian" the space "Project" <shouldOrNot> contain these entries:
| folder1/folder2/demo.txt |
And for user "Brian" folder "<parent-folder>" of the space "Project" <shouldOrNot> contain these files:
| <entry> |
Examples:
| role | shouldOrNot | status-code |
| manager | should | 201 |
| editor | should | 201 |
| viewer | should not | 403 |
| role | shouldOrNot | status-code | parent-folder | entry |
| manager | should | 201 | folder1/folder2 | demo.txt |
| editor | should | 201 | folder1/folder2 | demo.txt |
| viewer | should not | 403 | folder1 | folder2 |
Scenario Outline: user copies a folder from a project space with different role to a project space with different role
@@ -341,17 +341,17 @@ Feature: copy file
| role | <from_role> |
When user "Alice" copies folder "/folder1" from space "Project1" to "/folder1" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" the space "Project2" <shouldOrNot> contain these entries:
| /folder1/demo.txt |
And for user "Alice" folder "<parent-folder>" of the space "Project2" <shouldOrNot> contain these files:
| <entry> |
Examples:
| from_role | to_role | status-code | shouldOrNot |
| manager | manager | 201 | should |
| manager | editor | 201 | should |
| editor | manager | 201 | should |
| editor | editor | 201 | should |
| manager | viewer | 403 | should not |
| editor | viewer | 403 | should not |
| viewer | viewer | 403 | should not |
| from_role | to_role | status-code | shouldOrNot | parent-folder | entry |
| manager | manager | 201 | should | folder1 | demo.txt |
| manager | editor | 201 | should | folder1 | demo.txt |
| editor | manager | 201 | should | folder1 | demo.txt |
| editor | editor | 201 | should | folder1 | demo.txt |
| manager | viewer | 403 | should not | / | folder1 |
| editor | viewer | 403 | should not | / | folder1 |
| viewer | viewer | 403 | should not | / | folder1 |
Scenario Outline: user copies a folder from project space with different role to personal space
@@ -364,8 +364,8 @@ Feature: copy file
| role | <role> |
When user "Alice" copies file "/folder1" from space "Project" to "/folder1" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| /folder1/demo.txt |
And for user "Alice" folder "folder1" of the space "Personal" should contain these files:
| demo.txt |
Examples:
| role |
| manager |
@@ -386,16 +386,16 @@ Feature: copy file
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies folder "/folder1" from space "Project" to "/testshare/folder1" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" folder "testshare" of the space "Shares" <shouldOrNot> contain these files:
| /folder1/demo.txt |
And for user "Alice" folder "<parent-folder>" of the space "Shares" <shouldOrNot> contain these files:
| <entry> |
Examples:
| role | shouldOrNot | permissions | status-code |
| manager | should | 31 | 201 |
| editor | should | 31 | 201 |
| viewer | should | 31 | 201 |
| manager | should not | 17 | 403 |
| editor | should not | 17 | 403 |
| viewer | should not | 17 | 403 |
| role | shouldOrNot | permissions | status-code | parent-folder | entry |
| manager | should | 31 | 201 | testshare/folder1 | demo.txt |
| editor | should | 31 | 201 | testshare/folder1 | demo.txt |
| viewer | should | 31 | 201 | testshare/folder1 | demo.txt |
| manager | should not | 17 | 403 | testshare | folder1 |
| editor | should not | 17 | 403 | testshare | folder1 |
| viewer | should not | 17 | 403 | testshare | folder1 |
Scenario Outline: user copies a folder from personal space to project space with different role
@@ -408,13 +408,13 @@ Feature: copy file
And user "Alice" has uploaded file with content "some content" to "folder1/demo.txt"
When user "Alice" copies folder "/folder1" from space "Personal" to "/folder1" inside space "Project" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" the space "Project" <shouldOrNot> contain these entries:
| /folder1/demo.txt |
And for user "Alice" folder "<parent-folder>" of the space "Project" <shouldOrNot> contain these files:
| <entry> |
Examples:
| role | shouldOrNot | status-code |
| manager | should | 201 |
| editor | should | 201 |
| viewer | should not | 403 |
| role | shouldOrNot | status-code | parent-folder | entry |
| manager | should | 201 | folder1 | demo.txt |
| editor | should | 201 | folder1 | demo.txt |
| viewer | should not | 403 | / | folder1 |
Scenario Outline: user copies a folder from personal space to share space with different permissions
@@ -425,12 +425,12 @@ Feature: copy file
And user "Alice" has uploaded file with content "some content" to "folder1/demo.txt"
When user "Alice" copies folder "/folder1" from space "Personal" to "/testshare/folder1" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" folder "testshare" of the space "Shares" <shouldOrNot> contain these files:
| folder1/demo.txt |
And for user "Alice" folder "<parent-folder>" of the space "Shares" <shouldOrNot> contain these files:
| <entry> |
Examples:
| permissions | shouldOrNot | status-code |
| 31 | should | 201 |
| 17 | should not | 403 |
| permissions | shouldOrNot | status-code | parent-folder | entry |
| 31 | should | 201 | testshare/folder1 | demo.txt |
| 17 | should not | 403 | testshare | folder1 |
Scenario Outline: user copies a folder from share space with different role to personal space
@@ -463,8 +463,8 @@ Feature: copy file
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies folder "/testshare/folder1" from space "Shares" to "folder1" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| /folder1/testshare.txt |
And for user "Alice" folder "folder1" of the space "Project" should contain these files:
| testshare.txt |
Examples:
| role | permissions |
| manager | 31 |
@@ -486,8 +486,8 @@ Feature: copy file
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies folder "/testshare/folder1" from space "Shares" to "folder1" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project" should not contain these entries:
| /folder1/testshare.txt |
And for user "Alice" folder "/" of the space "Project" should not contain these files:
| folder1 |
Examples:
| permissions |
| 31 |
@@ -567,10 +567,10 @@ Feature: copy file
When user "Alice" copies folder "/Sample-Folder-A/sample-folder-b" from space "Personal" to "/BRIAN-FOLDER/second-level-folder/third-level-folder" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/Sample-Folder-A/sample-folder-b/sample-folder-c" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should contain these entries:
| /second-level-folder/third-level-folder/sample-folder-c/ |
And for user "Brian" folder "BRIAN-FOLDER" of the space "Personal" should contain these files:
| /second-level-folder/third-level-folder/sample-folder-c/ |
And for user "Alice" folder "BRIAN-FOLDER/second-level-folder/third-level-folder" of the space "Shares" should contain these entries:
| sample-folder-c |
And for user "Brian" folder "BRIAN-FOLDER/second-level-folder/third-level-folder" of the space "Personal" should contain these entries:
| sample-folder-c |
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
@@ -587,8 +587,8 @@ Feature: copy file
And user "Alice" has uploaded file with content "sample file-c" to "/Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "/Sample-Folder-A/sample-folder-b/textfile-c.txt" from space "Personal" to "/BRIAN-FOLDER/second-level-folder" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should not contain these files:
| /second-level-folder/third-level-folder |
And for user "Alice" folder "BRIAN-FOLDER/second-level-folder" of the space "Shares" should not contain these entries:
| third-level-folder |
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should contain these files:
| /second-level-folder |
@@ -632,10 +632,10 @@ Feature: copy file
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
When user "Alice" copies folder "/FOLDER/second-level-folder" from space "Personal" to "/BRIAN-FOLDER/second-level-folder/third-level-file.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should contain these entries:
| /second-level-folder/third-level-file.txt/third-level-folder |
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should not contain these entries:
| /second-level-folder/second-level-folder/ |
And for user "Alice" folder "BRIAN-FOLDER/second-level-folder/third-level-file.txt" of the space "Shares" should contain these entries:
| third-level-folder |
But for user "Alice" folder "BRIAN-FOLDER/second-level-folder" of the space "Shares" should not contain these entries:
| second-level-folder |
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
@@ -656,8 +656,8 @@ Feature: copy file
When user "Alice" copies folder "/Sample-Folder-A/sample-folder-b" from space "Personal" to "/BRIAN-FOLDER/second-level-folder/third-level-folder" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/Sample-Folder-A/sample-folder-b/sample-folder-c" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should contain these files:
| /second-level-folder/third-level-folder/sample-folder-c/ |
And for user "Alice" folder "BRIAN-FOLDER/second-level-folder/third-level-folder" of the space "Shares" should contain these entries:
| sample-folder-c |
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
@@ -677,8 +677,8 @@ Feature: copy file
And user "Alice" has uploaded file with content "sample file-c" to "/Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "/Sample-Folder-A/sample-folder-b/textfile-c.txt" from space "Personal" to "/BRIAN-FOLDER/second-level-folder" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should not contain these entries:
| /second-level-folder/third-level-folder |
And for user "Alice" folder "BRIAN-FOLDER/second-level-folder" of the space "Shares" should not contain these entries:
| third-level-folder |
And for user "Alice" the content of the file "/BRIAN-FOLDER/second-level-folder" of the space "Shares" should be "sample file-c"
And for user "Brian" the content of the file "/BRIAN-FOLDER/second-level-folder" of the space "Personal" should be "sample file-c"
And the response when user "Alice" gets the info of the last share should include
@@ -724,9 +724,10 @@ Feature: copy file
And user "Alice" has created folder "/FOLDER/second-level-folder/third-level-folder"
When user "Alice" copies folder "/FOLDER/second-level-folder" from space "Personal" to "/BRIAN-FOLDER/second-level-folder/third-level-file.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should contain these files:
| /second-level-folder/third-level-file.txt/ |
| /second-level-folder/third-level-file.txt/third-level-folder/ |
And for user "Alice" folder "BRIAN-FOLDER/second-level-folder" of the space "Shares" should contain these files:
| third-level-file.txt |
And for user "Alice" folder "BRIAN-FOLDER/second-level-folder/third-level-file.txt" of the space "Shares" should contain these files:
| third-level-folder |
And as "Alice" folder "FOLDER/second-level-folder/third-level-folder" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares" should not contain these files:
| /second-level-folder/second-level-folder |
@@ -742,9 +743,9 @@ Feature: copy file
And user "Alice" has uploaded a file inside space "Project" with content "new content" to "/insideSpace.txt"
When user "Alice" copies file "/insideSpace.txt" to "/newfolder/insideSpace (1).txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| newfolder/insideSpace.txt |
| newfolder/insideSpace (1).txt |
And for user "Alice" folder "newfolder" of the space "Project" should contain these entries:
| insideSpace.txt |
| insideSpace (1).txt |
And for user "Alice" the content of the file "/newfolder/insideSpace (1).txt" of the space "Project" should be "new content"
@issue-4797
@@ -780,13 +781,13 @@ Feature: copy file
And user "Brian" has uploaded file with content "new content" to "/personal.txt"
When user "Brian" copies file "/personal.txt" from space "Personal" to "/newfolder/personal (1).txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| newfolder/personal.txt |
| newfolder/personal (1).txt |
And for user "Alice" folder "newfolder" of the space "Project" should contain these entries:
| personal.txt |
| personal (1).txt |
And for user "Alice" the content of the file "/newfolder/personal (1).txt" of the space "Project" should be "new content"
And for user "Brian" the space "Shares" should contain these entries:
| newfolder/personal.txt |
| newfolder/personal (1).txt |
And for user "Brian" folder "newfolder" of the space "Shares" should contain these entries:
| personal.txt |
| personal (1).txt |
Scenario: copying a file from Personal to Shares with an option "replace"
@@ -803,8 +804,8 @@ Feature: copy file
And user "Brian" has uploaded file with content "new content" to "/personal.txt"
When user "Brian" overwrites file "/personal.txt" from space "Personal" to "/newfolder/personal.txt" inside space "Shares" while copying using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" the space "Project" should contain these entries:
| newfolder/personal.txt |
And for user "Alice" folder "newfolder" of the space "Project" should contain these entries:
| personal.txt |
And for user "Alice" the content of the file "/newfolder/personal.txt" of the space "Project" should be "new content"
When user "Alice" downloads version of the file "/newfolder/personal.txt" with the index "1" of the space "Project" using the WebDAV API
Then the HTTP status code should be "200"

View File

@@ -21,9 +21,9 @@ Feature: move (rename) file
| role | <role> |
When user "Alice" moves file "insideSpace.txt" to "newfolder/insideSpace.txt" in space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| newfolder/insideSpace.txt |
And for user "Alice" the space "Project" should not contain these entries:
And for user "Alice" folder "newfolder" of the space "Project" should contain these entries:
| insideSpace.txt |
But for user "Alice" the space "Project" should not contain these entries:
| insideSpace.txt |
Examples:
| role |
@@ -41,9 +41,9 @@ Feature: move (rename) file
| role | viewer |
When user "Alice" moves file "insideSpace.txt" to "newfolder/insideSpace.txt" in space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project" should not contain these entries:
| newfolder/insideSpace.txt |
And for user "Alice" the space "Project" should contain these entries:
And for user "Alice" folder "newfolder" of the space "Project" should not contain these entries:
| insideSpace.txt |
But for user "Alice" the space "Project" should contain these entries:
| insideSpace.txt |
@@ -111,8 +111,8 @@ Feature: move (rename) file
Then the HTTP status code should be "502"
And for user "Alice" the space "Project" should contain these entries:
| project.txt |
And for user "Alice" the space "Shares" should not contain these entries:
| /testshare/project.txt |
But for user "Alice" folder "testshare" of the space "Shares" should not contain these entries:
| project.txt |
Examples:
| role | permissions |
| manager | 31 |
@@ -152,8 +152,8 @@ Feature: move (rename) file
Then the HTTP status code should be "502"
And for user "Alice" the space "Personal" should contain these entries:
| personal.txt |
And for user "Alice" the space "Shares" should not contain these entries:
| /testshare/personal.txt |
But for user "Alice" folder "testshare" of the space "Shares" should not contain these entries:
| project.txt |
Examples:
| permissions |
| 31 |
@@ -217,10 +217,10 @@ Feature: move (rename) file
Then the HTTP status code should be "201"
And for user "Alice" folder "testshare2" of the space "Shares" should contain these entries:
| testshare1.txt |
And for user "Alice" folder "testshare1" of the space "Shares" should not contain these entries:
And for user "Brian" folder "testshare2" of the space "Personal" should contain these entries:
| testshare1.txt |
But for user "Alice" folder "testshare1" of the space "Shares" should not contain these entries:
| testshare1.txt |
And for user "Brian" the space "Personal" should contain these entries:
| /testshare2/testshare1.txt |
Scenario: user moves a file from space Shares with role editor to space Shares with role viewer
@@ -233,10 +233,10 @@ Feature: move (rename) file
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries:
| testshare1.txt |
And for user "Brian" folder "testshare2" of the space "Personal" should not contain these entries:
| testshare1.txt |
Scenario: user moves a file from space Shares with role viewer to space Shares with role editor
@@ -249,10 +249,10 @@ Feature: move (rename) file
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries:
| testshare1.txt |
And for user "Brian" folder "testshare2" of the space "Personal" should not contain these entries:
| testshare1.txt |
Scenario: checking file id after a move between received shares
@@ -274,8 +274,7 @@ Feature: move (rename) file
And for user "Brian" folder "folderB" of the space "Shares" should contain these entries:
| /ONE |
And for user "Brian" folder "folderA" of the space "Shares" should not contain these entries:
| /ONE |
| /ONE/TWO |
| /ONE |
And user "Brian" folder "/folderB/ONE" of the space "Shares" should have the previously stored id
@@ -293,8 +292,8 @@ Feature: move (rename) file
And the content of file "/testfile.txt" for user "Brian" should be "test data"
And for user "Alice" folder "testshare" of the space "Shares" should not contain these entries:
| testfile.txt |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare/testfile.txt |
And for user "Brian" folder "testshare" of the space "Personal" should not contain these entries:
| testfile.txt |
Scenario: moving a folder out of a shared folder as a sharer
@@ -314,8 +313,8 @@ Feature: move (rename) file
And the content of file "/testsubfolder/testfile.txt" for user "Brian" should be "test data"
And for user "Alice" folder "testshare" of the space "Shares" should not contain these entries:
| testsubfolder |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare/testsubfolder |
And for user "Brian" folder "testshare" of the space "Personal" should not contain these entries:
| testsubfolder |
Scenario: overwriting a file while moving

View File

@@ -64,7 +64,7 @@ Feature: upload resources on share using TUS protocol
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "uploaded content" to "/toShare/nonExistentFolder/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares" should not contain these entries:
| nonExistentFolder/file.txt |
| nonExistentFolder |
Scenario: attempt to upload a file into a nonexistent folder within correctly received read only share
@@ -74,7 +74,7 @@ Feature: upload resources on share using TUS protocol
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "uploaded content" to "/toShare/nonExistentFolder/file.txt" via TUS inside of the space "Shares" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares" should not contain these entries:
| nonExistentFolder/file.txt |
| nonExistentFolder |
Scenario: uploading a file to a received share folder

View File

@@ -667,7 +667,7 @@ class SpacesContext implements Context {
$foldersPath,
[],
$this->featureContext->getStepLineRef(),
'infinity',
null,
'files',
WebDavHelper::DAV_VERSION_SPACES
)

View File

@@ -143,7 +143,7 @@ class TrashbinContext implements Context {
* @return array response
* @throws Exception
*/
public function listTopOfTrashbinFolder(?string $user, string $depth = "infinity"):array {
public function listTopOfTrashbinFolder(?string $user, string $depth = "1"):array {
$password = $this->featureContext->getPasswordForUser($user);
$davPathVersion = $this->featureContext->getDavPathVersion();
$response = WebDavHelper::listFolder(

View File

@@ -1983,7 +1983,6 @@ trait WebDav {
$responseXmlObject = $this->listFolderAndReturnResponseXml(
$user,
"/",
"infinity"
);
foreach ($elementsSimplified as $expectedElement) {
// Allow the table of expected elements to have entries that do
@@ -4872,6 +4871,9 @@ trait WebDav {
?string $method = 'REPORT',
?string $folderpath = ''
):void {
if ($folderpath === "/") {
$folderpath = "";
}
$this->verifyTableNodeColumnsCount($expectedFiles, 1);
$elementRows = $expectedFiles->getRows();
$should = ($shouldOrNot !== "not");

View File

@@ -72,35 +72,6 @@ Feature: list files
| dav-path-version |
| spaces |
@depthInfinityPropfindEnabled
Scenario Outline: get the list of resources in the root folder 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 |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |
Scenario Outline: get the list of resources in a folder with depth 0
Given using <dav-path-version> DAV path
@@ -153,31 +124,6 @@ Feature: list files
| dav-path-version |
| spaces |
@depthInfinityPropfindEnabled
Scenario Outline: get the list of resources in 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 |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |
Scenario: get the list of resources in a folder shared through public link with depth 0
Given using new DAV path
@@ -226,29 +172,6 @@ Feature: list files
| /simple-folder1/textfile0.txt |
| /simple-folder1/simple-folder2/simple-folder3/simple-folder4 |
@depthInfinityPropfindEnabled
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 the following folders
| path |
| /simple-folder/simple-folder1/simple-folder2/simple-folder3 |
| /simple-folder/simple-folder1/simple-folder2/simple-folder3/simple-folder4 |
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 |
| /simple-folder1/simple-folder2/simple-folder3 |
| /simple-folder1/simple-folder2/simple-folder3/simple-folder4 |
Scenario Outline: get the list of files in the trashbin with depth 0
Given using <dav-path-version> DAV path
@@ -312,88 +235,3 @@ Feature: list files
Examples:
| dav-path-version |
| spaces |
@depthInfinityPropfindEnabled
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 |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |
@depthInfinityPropfindDisabled
Scenario Outline: get the list of resources in the root folder with depth infinity when depth infinity is not allowed
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 "412"
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |
@depthInfinityPropfindDisabled
Scenario Outline: get the list of resources in a folder shared through public link with depth infinity when depth infinity is not allowed
Given using <dav-path-version> DAV path
And user "Alice" has created the following folders
| path |
| /simple-folder/simple-folder1/simple-folder2/simple-folder3 |
| /simple-folder/simple-folder1/simple-folder2/simple-folder3/simple-folder4 |
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 "412"
Examples:
| dav-path-version |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |
@depthInfinityPropfindDisabled
Scenario Outline: get the list of files in the trashbin with depth infinity when depth infinity is not allowed
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 "412"
Examples:
| dav-path-version |
| old |
| new |
@skipOnRevaMaster
Examples:
| dav-path-version |
| spaces |

View File

@@ -33,7 +33,6 @@ Feature: PROPFIND
Examples:
| dav_path | depth |
| /remote.php/dav/spaces/%spaceid% | 0 |
| /remote.php/dav/spaces/%spaceid% | infinity |
Scenario: send PROPFIND request to a public link