From 0dc375416de89e305de7096c0175233454e56414 Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Wed, 12 Jun 2024 09:50:23 +0545 Subject: [PATCH] Removed failing ocs scenarios, removed from expected failure --- .../expected-failures-API-on-OCIS-storage.md | 10 --------- .../coreApiAuth/ocsDELETEAuth.feature | 1 - .../features/coreApiAuth/ocsGETAuth.feature | 22 +++++-------------- .../features/coreApiAuth/ocsPOSTAuth.feature | 7 ++---- 4 files changed, 7 insertions(+), 33 deletions(-) diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 1c13ebbaf..797d26890 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -141,16 +141,6 @@ cannot share a folder with create permission API, search, favorites, config, capabilities, not existing endpoints, CORS and others -#### [Ability to return error messages in Webdav response bodies](https://github.com/owncloud/ocis/issues/1293) - -- [coreApiAuth/ocsDELETEAuth.feature:7](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/ocsDELETEAuth.feature#L7) -- [coreApiAuth/ocsGETAuth.feature:10](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature#L10) -- [coreApiAuth/ocsGETAuth.feature:44](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature#L44) -- [coreApiAuth/ocsGETAuth.feature:75](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature#L75) -- [coreApiAuth/ocsGETAuth.feature:106](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature#L106) -- [coreApiAuth/ocsGETAuth.feature:123](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature#L123) -- [coreApiAuth/ocsPOSTAuth.feature:10](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/ocsPOSTAuth.feature#L10) - #### [sending MKCOL requests to another or non-existing user's webDav endpoints as normal user should return 404](https://github.com/owncloud/ocis/issues/5049) _ocdav: api compatibility, return correct status code_ diff --git a/tests/acceptance/features/coreApiAuth/ocsDELETEAuth.feature b/tests/acceptance/features/coreApiAuth/ocsDELETEAuth.feature index b0ae43410..12815f1f0 100644 --- a/tests/acceptance/features/coreApiAuth/ocsDELETEAuth.feature +++ b/tests/acceptance/features/coreApiAuth/ocsDELETEAuth.feature @@ -25,4 +25,3 @@ Feature: auth | /ocs/v1.php/cloud/users/%username%/subadmins | | /ocs/v2.php/cloud/users/%username%/subadmins | 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 "401" diff --git a/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature b/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature index c08c0eff4..55d352527 100644 --- a/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature +++ b/tests/acceptance/features/coreApiAuth/ocsGETAuth.feature @@ -25,7 +25,6 @@ Feature: auth | /ocs/v1.php/privatedata/getattribute | | /ocs/v2.php/privatedata/getattribute | 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 "401" @issue-1338 Scenario: ocs config end point accessible by unauthorized users @@ -49,8 +48,7 @@ Feature: auth | /ocs/v1.php/apps/files_sharing/api/v1/shares | | /ocs/v1.php/config | | /ocs/v1.php/privatedata/getattribute | - 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 "100" + Then the HTTP status code of responses on each endpoint should be "404,404,200,200,404" respectively When the user "Alice" requests these endpoints with "GET" with basic auth | endpoint | | /ocs/v2.php/apps/files_sharing/api/v1/remote_shares | @@ -58,8 +56,7 @@ Feature: auth | /ocs/v2.php/apps/files_sharing/api/v1/shares | | /ocs/v2.php/config | | /ocs/v2.php/privatedata/getattribute | - 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 "200" + Then the HTTP status code of responses on each endpoint should be "404,404,200,200,404" respectively When the user "Alice" requests these endpoints with "GET" with basic auth | endpoint | | /ocs/v1.php/cloud/apps | @@ -68,8 +65,7 @@ Feature: auth | /ocs/v2.php/cloud/apps | | /ocs/v2.php/cloud/groups | | /ocs/v2.php/cloud/users | - 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 "401" + Then the HTTP status code of responses on all endpoints should be "404" @issue-1338 @issue-1337 @smokeTest Scenario: using OCS as normal user with wrong password @@ -90,17 +86,14 @@ Feature: auth | /ocs/v1.php/privatedata/getattribute | | /ocs/v2.php/privatedata/getattribute | 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 "401" When user "Alice" requests these endpoints with "GET" using password "invalid" | endpoint | | /ocs/v1.php/config | 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 "100" When user "Alice" requests these endpoints with "GET" using password "invalid" | endpoint | | /ocs/v2.php/config | 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 "200" @issue-1319 Scenario: using OCS with admin basic auth @@ -109,15 +102,13 @@ Feature: auth | /ocs/v1.php/cloud/apps | | /ocs/v1.php/cloud/groups | | /ocs/v1.php/cloud/users | - 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 "100" + Then the HTTP status code of responses on all endpoints should be "404" When the administrator requests these endpoints with "GET" | endpoint | | /ocs/v2.php/cloud/apps | | /ocs/v2.php/cloud/groups | | /ocs/v2.php/cloud/users | - 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 "200" + Then the HTTP status code of responses on all endpoints should be "404" @issue-1337 @issue-1319 Scenario: using OCS as admin user with wrong password @@ -138,14 +129,11 @@ Feature: auth | /ocs/v1.php/privatedata/getattribute | | /ocs/v2.php/privatedata/getattribute | 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" When user "another-admin" requests these endpoints with "GET" using password "invalid" | endpoint | | /ocs/v1.php/config | 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 "100" When user "another-admin" requests these endpoints with "GET" using password "invalid" | endpoint | | /ocs/v2.php/config | 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 "200" diff --git a/tests/acceptance/features/coreApiAuth/ocsPOSTAuth.feature b/tests/acceptance/features/coreApiAuth/ocsPOSTAuth.feature index e56d1979b..6ae0dae04 100644 --- a/tests/acceptance/features/coreApiAuth/ocsPOSTAuth.feature +++ b/tests/acceptance/features/coreApiAuth/ocsPOSTAuth.feature @@ -31,14 +31,11 @@ Feature: auth | /ocs/v1.php/privatedata/setattribute/testing/test | | /ocs/v2.php/privatedata/setattribute/testing/test | 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" When user "Alice" requests these endpoints with "POST" including body "doesnotmatter" using password "invalid" about user "Alice" | endpoint | | /ocs/v1.php/person/check | - 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" + Then the HTTP status code of responses on all endpoints should be "401" When user "Alice" requests these endpoints with "POST" including body "doesnotmatter" using password "invalid" about user "Alice" | endpoint | | /ocs/v2.php/person/check | - Then the HTTP status code of responses on all endpoints should be "400" - And the OCS status code of responses on all endpoints should be "400" + Then the HTTP status code of responses on all endpoints should be "401"