From 64200621561c45bcb5d28fc3fda46b2866c822b6 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Fri, 15 May 2020 14:30:22 +0200 Subject: [PATCH] update api tests --- .../features/apiAuthOcs/ocsGETAuth.feature | 2 +- .../createShareWithInvalidPermissions.feature | 6 +- .../createShare.feature | 106 ------------------ .../features/apiVersions/fileVersions.feature | 2 +- 4 files changed, 5 insertions(+), 111 deletions(-) diff --git a/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature b/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature index 38d5e4d2b6b4..632670087a8b 100644 --- a/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature +++ b/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature @@ -114,7 +114,7 @@ Feature: auth | /ocs/v1.php/cloud/users | 403 | 200 | | /ocs/v2.php/cloud/users | 403 | 403 | | /ocs/v1.php/config | 100 | 200 | - | /ocs/v2.php/config | 100 | 200 | + | /ocs/v2.php/config | 200 | 200 | | /ocs/v1.php/privatedata/getattribute | 998 | 200 | | /ocs/v2.php/privatedata/getattribute | 998 | 404 | diff --git a/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature b/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature index 875f017f9c50..d08e83cc9716 100644 --- a/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature +++ b/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature @@ -61,7 +61,7 @@ Feature: cannot share resources with invalid permissions Examples: | ocs_api_version | ocs_status_code | http_status_code | | 1 | 100 | 200 | - | 2 | 100 | 200 | + | 2 | 200 | 200 | @skipOnOcis @issue-ocis-reva-45 @issue-ocis-reva-64 Scenario Outline: Cannot create a share of a file with a user with only (create,delete) permission @@ -98,9 +98,9 @@ Feature: cannot share resources with invalid permissions Examples: | ocs_api_version | ocs_status_code | http_status_code | permissions | | 1 | 100 | 200 | delete | - | 2 | 100 | 200 | delete | + | 2 | 200 | 200 | delete | | 1 | 100 | 200 | create,delete | - | 2 | 100 | 200 | create,delete | + | 2 | 200 | 200 | create,delete | @skipOnOcis @issue-ocis-reva-34 Scenario Outline: Cannot create a share of a file with a group with only create permission diff --git a/tests/acceptance/features/apiShareManagementBasic/createShare.feature b/tests/acceptance/features/apiShareManagementBasic/createShare.feature index f531a5fd88f1..673ea6c81b69 100644 --- a/tests/acceptance/features/apiShareManagementBasic/createShare.feature +++ b/tests/acceptance/features/apiShareManagementBasic/createShare.feature @@ -32,12 +32,6 @@ Feature: sharing | 1 | 100 | | 2 | 200 | - @skipOnOcis - @issue-ocis-reva-20 - @issue-ocis-reva-26 - @issue-ocis-reva-43 - @issue-ocis-reva-44 - @issue-ocis-reva-64 Scenario Outline: Creating a share of a file with a user and asking for various permission combinations Given using OCS API version "" And user "Brian" has been created with default attributes and without skeleton files @@ -71,35 +65,6 @@ Feature: sharing | 1 | 2 | 2 | 100 | | 2 | 2 | 2 | 200 | - @skipOnOcV10 - @issue-ocis-reva-20 - @issue-ocis-reva-26 - @issue-ocis-reva-43 - @issue-ocis-reva-44 - @issue-ocis-reva-64 - #after fixing all issues delete this Scenario and use the one above - Scenario Outline: Creating a share of a file with a user and asking for various permission combinations - Given using OCS API version "" - And user "Brian" has been created with default attributes and without skeleton files - When user "Alice" shares file "textfile0.txt" with user "Brian" with permissions using the sharing API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And the OCS status message should be "OK" - Examples: - | ocs_api_version | requested_permissions | granted_permissions | ocs_status_code | - # Ask for full permissions. You get share plus read plus update. create and delete do not apply to shares of a file - | 1 | 31 | 31 | 100 | - | 2 | 31 | 31 | 100 | - # Ask for read, share (17), create and delete. You get share plus read - | 1 | 29 | 31 | 100 | - | 2 | 29 | 31 | 100 | - # Ask for read, update, create, delete. You get read plus update. - | 1 | 15 | 15 | 100 | - | 2 | 15 | 15 | 100 | - # Ask for just update. You get exactly update (you do not get read or anything else) - | 1 | 2 | 2 | 100 | - | 2 | 2 | 2 | 100 | - Scenario Outline: Creating a share of a file with no permissions should fail Given using OCS API version "" And user "Brian" has been created with default attributes and without skeleton files @@ -113,51 +78,6 @@ Feature: sharing | 1 | 200 | | 2 | 400 | - @skipOnOcV10 - @issue-ocis-reva-64 - #after fixing all issues delete this Scenario or adjust it, so that it works also with oC10 - Scenario Outline: more tests to demonstrate different ocis-reva issue 64 behaviours - Given using OCS API version "" - And user "Brian" has been created with default attributes and without skeleton files - And user "Alice" has uploaded file with content "Random data" to "randomfile.txt" - When user "Alice" shares file "/randomfile.txt" with user "Brian" using the sharing API - Then the OCS status code should be "100" - And the OCS status message should be "OK" - And the HTTP status code should be "" - And as "Brian" file "randomfile.txt" should not exist - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 200 | - - @skipOnOcV10 - @issue-ocis-reva-64 - #after fixing all issues delete this Scenario or adjust it, so that it works also with oC10 - Scenario Outline: more tests to demonstrate different ocis-reva issue 64 behaviours - Given using OCS API version "" - And user "Brian" has been created with default attributes and without skeleton files - When user "Alice" shares file "/doesNotExist/randomfile.txt" with user "Brian" using the sharing API - And the HTTP status code should be "" - And as "Brian" file "randomfile.txt" should not exist - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 404 | - - @skipOnOcV10 - @issue-ocis-reva-64 - #after fixing all issues delete this Scenario or adjust it, so that it works also with oC10 - Scenario Outline: more tests to demonstrate different ocis-reva issue 64 behaviours - Given using OCS API version "" - And user "Brian" has been created with default attributes and without skeleton files - When user "Alice" shares file "/NotExistingFile.txt" with user "Brian" using the sharing API - And the HTTP status code should be "" - And as "Brian" file "randomfile.txt" should not exist - Examples: - | ocs_api_version | http_status_code | - | 1 | 200 | - | 2 | 404 | - @skipOnOcis @issue-ocis-reva-64 #OCIS returns an empty response when sharing with a file inside the /home folder @@ -189,12 +109,6 @@ Feature: sharing | 1 | 200 | | 2 | 400 | - @skipOnOcis - @issue-ocis-reva-20 - @issue-ocis-reva-26 - @issue-ocis-reva-43 - @issue-ocis-reva-46 - @issue-ocis-reva-64 Scenario Outline: Creating a share of a folder with a user, the default permissions are all permissions(31) Given using OCS API version "" And user "Brian" has been created with default attributes and without skeleton files @@ -219,26 +133,6 @@ Feature: sharing | 1 | 100 | | 2 | 200 | - @skipOnOcV10 - @issue-ocis-reva-20 - @issue-ocis-reva-26 - @issue-ocis-reva-43 - @issue-ocis-reva-46 - @issue-ocis-reva-64 - #after fixing all issues delete this Scenario and use the one above - Scenario Outline: Creating a share of a folder with a user, the default permissions are all permissions(31) - Given using OCS API version "" - And user "Brian" has been created with default attributes and without skeleton files - And user "Alice" has created folder "/FOLDER" - When user "Alice" shares folder "/FOLDER" with user "Brian" using the sharing API - Then the OCS status code should be "" - And the OCS status message should be "OK" - And the HTTP status code should be "200" - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 100 | - @skipOnOcis @issue-ocis-reva-34 Scenario Outline: Creating a share of a file with a group, the default permissions are read(1)+update(2)+can-share(16) Given using OCS API version "" diff --git a/tests/acceptance/features/apiVersions/fileVersions.feature b/tests/acceptance/features/apiVersions/fileVersions.feature index 13d0eb44cec7..95de2af4f014 100644 --- a/tests/acceptance/features/apiVersions/fileVersions.feature +++ b/tests/acceptance/features/apiVersions/fileVersions.feature @@ -67,7 +67,7 @@ Feature: dav-versions And user "Alice" uploads file "filesForUpload/davtest.txt" asynchronously to "/davtest.txt" in 3 chunks with new chunking and using the WebDAV API Then the version folder of file "/davtest.txt" for user "Alice" should contain "1" element - @smokeTest @issue-ocis-reva-94 + @smokeTest Scenario: Remove a file Given user "Alice" has uploaded file "filesForUpload/davtest.txt" to "/davtest.txt" And user "Alice" has uploaded file "filesForUpload/davtest.txt" to "/davtest.txt"