mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 20:29:54 -06:00
restore test files removed in PR #1488
This commit is contained in:
18
tests/acceptance/features/apiBasic/addUser.feature
Normal file
18
tests/acceptance/features/apiBasic/addUser.feature
Normal file
@@ -0,0 +1,18 @@
|
||||
@api @provisioning_api-app-required @skipOnLDAP
|
||||
Feature: add user
|
||||
As an admin
|
||||
I want to be able to add users
|
||||
So that I can give people controlled individual access to resources on the ownCloud server
|
||||
|
||||
Scenario Outline: admin creates a user
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And user "brand-new-user" has been deleted
|
||||
When the administrator sends a user creation request for user "brand-new-user" password "%alt1%" using the provisioning API
|
||||
Then the OCS status code should be "<ocs_status_code>"
|
||||
And the HTTP status code should be "200"
|
||||
And user "brand-new-user" should exist
|
||||
And user "brand-new-user" should be able to access a skeleton file
|
||||
Examples:
|
||||
| ocs_api_version | ocs_status_code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
18
tests/acceptance/features/apiBasic/uploadFile.feature
Normal file
18
tests/acceptance/features/apiBasic/uploadFile.feature
Normal file
@@ -0,0 +1,18 @@
|
||||
@api
|
||||
Feature: upload file
|
||||
As a user
|
||||
I want to be able to upload files
|
||||
So that I can store and share files between multiple client systems
|
||||
|
||||
Scenario Outline: upload a file and check download content
|
||||
Given using OCS API version "<ocs_api_version>"
|
||||
And user "Alice" has been created with default attributes and without skeleton files
|
||||
And using <dav_version> DAV path
|
||||
When user "Alice" uploads file with content "uploaded content" to "/upload.txt" using the WebDAV API
|
||||
Then the content of file "/upload.txt" for user "Alice" should be "uploaded content"
|
||||
Examples:
|
||||
| ocs_api_version | dav_version |
|
||||
| 1 | old |
|
||||
| 1 | new |
|
||||
| 2 | old |
|
||||
| 2 | new |
|
||||
@@ -0,0 +1,26 @@
|
||||
@api
|
||||
Feature: attempt to PUT files with invalid password
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/PARENT"
|
||||
|
||||
Scenario: send PUT requests to webDav endpoints as normal user with wrong password
|
||||
When user "Alice" requests these endpoints with "PUT" including body "doesnotmatter" using password "invalid" about user "Alice"
|
||||
| endpoint |
|
||||
| /remote.php/webdav/textfile0.txt |
|
||||
| /remote.php/dav/files/%username%/textfile0.txt |
|
||||
| /remote.php/webdav/PARENT |
|
||||
| /remote.php/dav/files/%username%/PARENT |
|
||||
| /remote.php/dav/files/%username%/PARENT/parent.txt |
|
||||
Then the HTTP status code of responses on all endpoints should be "401"
|
||||
|
||||
Scenario: send PUT requests to webDav endpoints as normal user with no password
|
||||
When user "Alice" requests these endpoints with "PUT" including body "doesnotmatter" using password "" about user "Alice"
|
||||
| endpoint |
|
||||
| /remote.php/webdav/textfile0.txt |
|
||||
| /remote.php/dav/files/%username%/textfile0.txt |
|
||||
| /remote.php/webdav/PARENT |
|
||||
| /remote.php/dav/files/%username%/PARENT |
|
||||
| /remote.php/dav/files/%username%/PARENT/parent.txt |
|
||||
Then the HTTP status code of responses on all endpoints should be "401"
|
||||
Reference in New Issue
Block a user