[full-ci]Enforce pass by default. changed api tests (#7706)
* set enforce pass by default. change tests * fix tests * fix test
This commit is contained in:
@@ -124,9 +124,10 @@ Feature: list files
|
||||
| dav-path-version |
|
||||
| spaces |
|
||||
|
||||
|
||||
@env-config
|
||||
Scenario: get the list of resources in a folder shared through public link with depth 0
|
||||
Given using new DAV path
|
||||
And the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false"
|
||||
And user "Alice" has created the following folders
|
||||
| path |
|
||||
| /simple-folder/simple-folder1/simple-folder2/simple-folder3 |
|
||||
@@ -150,6 +151,7 @@ Feature: list files
|
||||
|
||||
Scenario: get the list of resources in a folder shared through public link with depth 1
|
||||
Given using new DAV path
|
||||
And the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false"
|
||||
And user "Alice" has created the following folders
|
||||
| path |
|
||||
| /simple-folder/simple-folder1/simple-folder2/simple-folder3 |
|
||||
|
||||
@@ -25,40 +25,28 @@ Feature: PROPFIND
|
||||
| depth | <depth> |
|
||||
Then the HTTP status code should be "<http-code>"
|
||||
Examples:
|
||||
| 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 |
|
||||
| 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 | http-code |
|
||||
| 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
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/PARENT"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read |
|
||||
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the value of the item "//d:href" in the response should match "/%base_path%\/remote.php\/dav\/public-files\/%public_token%\/$/"
|
||||
And the value of the item "//oc:public-link-share-owner" in the response should be "Alice"
|
||||
|
||||
|
||||
Scenario: send PROPFIND request to a public link shared with password
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/PARENT"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read |
|
||||
| password | 1111 |
|
||||
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API with password "1111"
|
||||
| path | /PARENT |
|
||||
| permissions | read |
|
||||
| password | %public% |
|
||||
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API with password "%public%"
|
||||
Then the HTTP status code should be "207"
|
||||
And the value of the item "//d:href" in the response should match "/%base_path%\/remote.php\/dav\/public-files\/%public_token%\/$/"
|
||||
And the value of the item "//oc:public-link-share-owner" in the response should be "Alice"
|
||||
@@ -68,9 +56,9 @@ Feature: PROPFIND
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/PARENT"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read |
|
||||
| password | 1111 |
|
||||
| path | /PARENT |
|
||||
| permissions | read |
|
||||
| password | %public% |
|
||||
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API
|
||||
Then the HTTP status code should be "401"
|
||||
And the value of the item "/d:error/s:exception" in the response should be "Sabre\DAV\Exception\NotAuthenticated"
|
||||
@@ -80,9 +68,9 @@ Feature: PROPFIND
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/PARENT"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read |
|
||||
| password | 1111 |
|
||||
| path | /PARENT |
|
||||
| permissions | read |
|
||||
| password | %public% |
|
||||
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API with password "1234"
|
||||
Then the HTTP status code should be "401"
|
||||
And the value of the item "/d:error/s:exception" in the response should be "Sabre\DAV\Exception\NotAuthenticated"
|
||||
|
||||
Reference in New Issue
Block a user