test: fix tests and issue number
This commit is contained in:
@@ -164,27 +164,12 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
|
|||||||
- _The `OC-LazyOps` header is [no longer supported by the client](https://github.com/owncloud/client/pull/8398), implementing this is not necessary for a first production release. We plan to have an upload state machine to visualize the state of a file, see https://github.com/owncloud/ocis/issues/214_
|
- _The `OC-LazyOps` header is [no longer supported by the client](https://github.com/owncloud/client/pull/8398), implementing this is not necessary for a first production release. We plan to have an upload state machine to visualize the state of a file, see https://github.com/owncloud/ocis/issues/214_
|
||||||
- _Blacklisted ignored files are no longer required because ocis can handle `.htaccess` files without security implications introduced by serving user provided files with apache._
|
- _Blacklisted ignored files are no longer required because ocis can handle `.htaccess` files without security implications introduced by serving user provided files with apache._
|
||||||
|
|
||||||
#### [Blacklist files extensions](https://github.com/owncloud/ocis/issues/2177)
|
|
||||||
|
|
||||||
- [coreApiWebdavProperties/copyFile.feature:109](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L109)
|
|
||||||
- [coreApiWebdavProperties/copyFile.feature:110](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L110)
|
|
||||||
- [coreApiWebdavProperties/copyFile.feature:111](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L111)
|
|
||||||
- [coreApiWebdavProperties/createFileFolder.feature:95](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L95)
|
|
||||||
- [coreApiWebdavProperties/createFileFolder.feature:96](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L96)
|
|
||||||
- [coreApiWebdavProperties/createFileFolder.feature:97](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L97)
|
|
||||||
- [coreApiWebdavUpload/uploadFile.feature:153](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L153)
|
|
||||||
- [coreApiWebdavUpload/uploadFile.feature:152](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L152)
|
|
||||||
- [coreApiWebdavUpload/uploadFile.feature:154](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L154)
|
|
||||||
- [coreApiWebdavMove2/moveFile.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L177)
|
|
||||||
- [coreApiWebdavMove2/moveFile.feature:178](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L178)
|
|
||||||
- [coreApiWebdavMove2/moveFile.feature:143](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L143)
|
|
||||||
|
|
||||||
#### [Renaming resource to banned name is allowed in spaces webdav](https://github.com/owncloud/ocis/issues/3099)
|
#### [Renaming resource to banned name is allowed in spaces webdav](https://github.com/owncloud/ocis/issues/3099)
|
||||||
|
|
||||||
|
- [coreApiWebdavMove2/moveFile.feature:143](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L143)
|
||||||
- [coreApiWebdavMove1/moveFolder.feature:36](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L36)
|
- [coreApiWebdavMove1/moveFolder.feature:36](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L36)
|
||||||
- [coreApiWebdavMove1/moveFolder.feature:50](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L50)
|
- [coreApiWebdavMove1/moveFolder.feature:50](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L50)
|
||||||
- [coreApiWebdavMove1/moveFolder.feature:64](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L64)
|
- [coreApiWebdavMove1/moveFolder.feature:64](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L64)
|
||||||
- [coreApiWebdavMove2/moveFile.feature:179](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L179)
|
|
||||||
|
|
||||||
#### [HTTP status code differ while deleting file of another user's trash bin](https://github.com/owncloud/ocis/issues/3544)
|
#### [HTTP status code differ while deleting file of another user's trash bin](https://github.com/owncloud/ocis/issues/3544)
|
||||||
|
|
||||||
|
|||||||
@@ -1652,10 +1652,15 @@ trait WebDav {
|
|||||||
$elementToRequest,
|
$elementToRequest,
|
||||||
"1"
|
"1"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// TODO: make it work for folder entries
|
||||||
|
// Doesn't work for folder entries
|
||||||
|
// as the folder entry has trailing '/' in d:href
|
||||||
$webdavPath = "/" . $this->getFullDavFilesPath($user) . $expectedElement;
|
$webdavPath = "/" . $this->getFullDavFilesPath($user) . $expectedElement;
|
||||||
$element = $responseXmlObject->xpath(
|
$element = $responseXmlObject->xpath(
|
||||||
"//d:response/d:href[text() = \"$webdavPath\"]"
|
"//d:response/d:href[text() = \"$webdavPath\"]"
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($expectedToBeListed
|
if ($expectedToBeListed
|
||||||
&& (!isset($element[0]) || urldecode($element[0]->__toString()) !== urldecode($webdavPath))
|
&& (!isset($element[0]) || urldecode($element[0]->__toString()) !== urldecode($webdavPath))
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Feature: move (rename) folder
|
|||||||
| new |
|
| new |
|
||||||
| spaces |
|
| spaces |
|
||||||
|
|
||||||
|
@issue-3099
|
||||||
Scenario Outline: renaming a folder to a backslash should return an error
|
Scenario Outline: renaming a folder to a backslash should return an error
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
And user "Alice" has created folder "/testshare"
|
And user "Alice" has created folder "/testshare"
|
||||||
@@ -35,7 +35,7 @@ Feature: move (rename) folder
|
|||||||
| new |
|
| new |
|
||||||
| spaces |
|
| spaces |
|
||||||
|
|
||||||
|
@issue-3099
|
||||||
Scenario Outline: renaming a folder beginning with a backslash should return an error
|
Scenario Outline: renaming a folder beginning with a backslash should return an error
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
And user "Alice" has created folder "/testshare"
|
And user "Alice" has created folder "/testshare"
|
||||||
@@ -49,7 +49,7 @@ Feature: move (rename) folder
|
|||||||
| new |
|
| new |
|
||||||
| spaces |
|
| spaces |
|
||||||
|
|
||||||
|
@issue-3099
|
||||||
Scenario Outline: renaming a folder including a backslash encoded should return an error
|
Scenario Outline: renaming a folder including a backslash encoded should return an error
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
And user "Alice" has created folder "/testshare"
|
And user "Alice" has created folder "/testshare"
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ Feature: move (rename) file
|
|||||||
| new |
|
| new |
|
||||||
| spaces |
|
| spaces |
|
||||||
|
|
||||||
@issue-1295
|
@issue-1295 @issue-2177 @issue-3099
|
||||||
Scenario Outline: rename a file into an invalid filename
|
Scenario Outline: rename a file into an invalid filename
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToRename.txt"
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToRename.txt"
|
||||||
@@ -159,19 +159,16 @@ Feature: move (rename) file
|
|||||||
| new |
|
| new |
|
||||||
| spaces |
|
| spaces |
|
||||||
|
|
||||||
@issue-1295
|
@issue-1295 @issue-2177
|
||||||
Scenario Outline: renaming a file to a path with extension .part should not be possible
|
Scenario Outline: renaming a file to a path with extension .part should not be possible
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToRename.txt"
|
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToRename.txt"
|
||||||
When user "Alice" moves file "/fileToRename.txt" to "/welcome.part" using the WebDAV API
|
When user "Alice" moves file "/fileToRename.txt" to "/welcome.part" using the WebDAV API
|
||||||
Then the HTTP status code should be "400"
|
Then the HTTP status code should be "201"
|
||||||
And the DAV exception should be "OCA\DAV\Connector\Sabre\Exception\InvalidPath"
|
|
||||||
And the DAV message should be "Can`t upload files with extension .part because these extensions are reserved for internal use."
|
|
||||||
And the DAV reason should be "Can`t upload files with extension .part because these extensions are reserved for internal use."
|
|
||||||
And user "Alice" should see the following elements
|
And user "Alice" should see the following elements
|
||||||
| /fileToRename.txt |
|
| /welcome.part |
|
||||||
But user "Alice" should not see the following elements
|
But user "Alice" should not see the following elements
|
||||||
| /fileToRename.part |
|
| /fileToRename.txt |
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
| old |
|
| old |
|
||||||
|
|||||||
@@ -92,18 +92,14 @@ Feature: copy file
|
|||||||
| old |
|
| old |
|
||||||
| new |
|
| new |
|
||||||
|
|
||||||
@issue-1345
|
@issue-1345 @issue-2177
|
||||||
Scenario Outline: copying file to a path with extension .part should not be possible
|
Scenario Outline: copying file to a path with extension .part should not be possible
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
When user "Alice" copies file "/textfile1.txt" to "/textfile1.part" using the WebDAV API
|
When user "Alice" copies file "/textfile1.txt" to "/textfile1.part" using the WebDAV API
|
||||||
Then the HTTP status code should be "400"
|
Then the HTTP status code should be "201"
|
||||||
And the DAV exception should be "OCA\DAV\Connector\Sabre\Exception\InvalidPath"
|
|
||||||
And the DAV message should be "Can`t upload files with extension .part because these extensions are reserved for internal use."
|
|
||||||
And the DAV reason should be "Can`t upload files with extension .part because these extensions are reserved for internal use."
|
|
||||||
And user "Alice" should see the following elements
|
And user "Alice" should see the following elements
|
||||||
| /textfile1.txt |
|
|
||||||
But user "Alice" should not see the following elements
|
|
||||||
| /textfile1.part |
|
| /textfile1.part |
|
||||||
|
| /textfile1.txt |
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
| old |
|
| old |
|
||||||
|
|||||||
@@ -80,16 +80,12 @@ Feature: create files and folder
|
|||||||
| new |
|
| new |
|
||||||
| spaces |
|
| spaces |
|
||||||
|
|
||||||
@issue-1345
|
@issue-1345 @issue-2177
|
||||||
Scenario Outline: creating a directory which contains .part should not be possible
|
Scenario Outline: creating a directory which contains .part should not be possible
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
When user "Alice" creates folder "/folder.with.ext.part" using the WebDAV API
|
When user "Alice" creates folder "/folder.with.ext.part" using the WebDAV API
|
||||||
Then the HTTP status code should be "400"
|
Then the HTTP status code should be "201"
|
||||||
And the DAV exception should be "OCA\DAV\Connector\Sabre\Exception\InvalidPath"
|
And as "Alice" folder "folder.with.ext.part" should exist
|
||||||
And the DAV message should be "Can`t upload files with extension .part because these extensions are reserved for internal use."
|
|
||||||
And the DAV reason should be "Can`t upload files with extension .part because these extensions are reserved for internal use."
|
|
||||||
And user "Alice" should not see the following elements
|
|
||||||
| /folder.with.ext.part |
|
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
| old |
|
| old |
|
||||||
|
|||||||
@@ -137,15 +137,12 @@ Feature: upload file
|
|||||||
| new |
|
| new |
|
||||||
| spaces |
|
| spaces |
|
||||||
|
|
||||||
@issue-1345
|
@issue-1345 @issue-2177
|
||||||
Scenario Outline: uploading file to path with extension .part should not be possible
|
Scenario Outline: uploading file to path with extension .part should not be possible
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile.part" using the WebDAV API
|
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile.part" using the WebDAV API
|
||||||
Then the HTTP status code should be "400"
|
Then the HTTP status code should be "201"
|
||||||
And the DAV exception should be "OCA\DAV\Connector\Sabre\Exception\InvalidPath"
|
And user "Alice" should see the following elements
|
||||||
And the DAV message should be "Can`t upload files with extension .part because these extensions are reserved for internal use."
|
|
||||||
And the DAV reason should be "Can`t upload files with extension .part because these extensions are reserved for internal use."
|
|
||||||
And user "Alice" should not see the following elements
|
|
||||||
| /textfile.part |
|
| /textfile.part |
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
|
|||||||
Reference in New Issue
Block a user