Files
opencloud/tests/acceptance/features/coreApiAuth/ocsPUTAuth.feature
T
Sawjan Gurung 4df7c5712c [tests-only][ci] split large API test suites (#8212) (#8252)
* split large API test suites

* remove 30s sleep

* organize core-api test suites

* organize core-api test suites

* divide into 9 pipelines

* organize core-api test suites

* organize api-search suites

* organize api-search suites

* fix config file
2024-01-19 14:00:40 +01:00

29 lines
1.6 KiB
Gherkin

Feature: auth
As a user
I want to send PUT request to various endpoints
So that I can make sure the endpoints need proper authentication
@issue-1337 @smokeTest
Scenario: send PUT request to OCS endpoints as admin with wrong password
When user "admin" requests these endpoints with "PUT" including body "doesnotmatter" using password "invalid" about user "Alice"
| endpoint |
| /ocs/v1.php/cloud/users/%username% |
| /ocs/v2.php/cloud/users/%username% |
| /ocs/v1.php/cloud/users/%username%/disable |
| /ocs/v2.php/cloud/users/%username%/disable |
| /ocs/v1.php/cloud/users/%username%/enable |
| /ocs/v2.php/cloud/users/%username%/enable |
| /ocs/v1.php/apps/files_sharing/api/v1/shares/123 |
| /ocs/v2.php/apps/files_sharing/api/v1/shares/123 |
Then the HTTP status code of responses on all endpoints should be "401"
And the OCS status code of responses on all endpoints should be "997"
Scenario: request to edit nonexistent user by authorized admin gets unauthorized in http response
When user "admin" requests these endpoints with "PUT" including body "doesnotmatter" about user "nonexistent"
| endpoint |
| /ocs/v1.php/cloud/users/%username% |
| /ocs/v2.php/cloud/users/%username% |
Then the HTTP status code of responses on all endpoints should be "200"
And the OCS status code of responses on all endpoints should be "101"