From 27d2dc2c91e8dba21ca7ae8553429391871f8bcf Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Tue, 30 Jan 2024 14:08:39 +0545 Subject: [PATCH] adjust MOVE tests --- ...ected-failures-localAPI-on-OCIS-storage.md | 54 ---------------- .../moveByFileId.feature | 62 +++++++++---------- .../apiSpacesShares/moveSpaces.feature | 16 ++--- 3 files changed, 39 insertions(+), 93 deletions(-) diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index e4ecfd70210..6f729a599af 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -274,60 +274,6 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiSpacesDavOperation/moveByFileId.feature:688](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L688) - [apiSpacesDavOperation/moveByFileId.feature:689](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L689) -### [MOVE a file from Project space (manager/editor) to Personal space returns 502 code](https://github.com/owncloud/ocis/issues/7618) - -- [apiSpacesDavOperation/moveByFileId.feature:130](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L130) -- [apiSpacesDavOperation/moveByFileId.feature:131](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L131) -- [apiSpacesDavOperation/moveByFileId.feature:133](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L133) -- [apiSpacesDavOperation/moveByFileId.feature:134](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L134) -- [apiSpacesDavOperation/moveByFileId.feature:152](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L152) -- [apiSpacesDavOperation/moveByFileId.feature:153](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L153) -- [apiSpacesDavOperation/moveByFileId.feature:398](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L398) -- [apiSpacesDavOperation/moveByFileId.feature:399](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L399) -- [apiSpacesDavOperation/moveByFileId.feature:401](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L401) -- [apiSpacesDavOperation/moveByFileId.feature:402](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L402) -- [apiSpacesDavOperation/moveByFileId.feature:420](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L420) -- [apiSpacesDavOperation/moveByFileId.feature:421](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L421) -- [apiSpacesShares/moveSpaces.feature:113](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L113) -- [apiSpacesShares/moveSpaces.feature:114](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L114) -- [apiSpacesShares/moveSpaces.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L161) -- [apiSpacesShares/moveSpaces.feature:162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L162) - -### [MOVE a file from Project space (manager/editor) to Project space (manager/editor) returns 502 code](https://github.com/owncloud/ocis/issues/8116) - -- [apiSpacesDavOperation/moveByFileId.feature:300](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L300) -- [apiSpacesDavOperation/moveByFileId.feature:301](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L301) -- [apiSpacesDavOperation/moveByFileId.feature:302](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L302) -- [apiSpacesDavOperation/moveByFileId.feature:303](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L303) -- [apiSpacesDavOperation/moveByFileId.feature:309](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L309) -- [apiSpacesDavOperation/moveByFileId.feature:310](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L310) -- [apiSpacesDavOperation/moveByFileId.feature:311](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L311) -- [apiSpacesDavOperation/moveByFileId.feature:312](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L312) -- [apiSpacesDavOperation/moveByFileId.feature:338](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L338) -- [apiSpacesDavOperation/moveByFileId.feature:339](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L339) -- [apiSpacesShares/moveSpaces.feature:87](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L87) -- [apiSpacesShares/moveSpaces.feature:88](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L88) -- [apiSpacesShares/moveSpaces.feature:89](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L89) -- [apiSpacesShares/moveSpaces.feature:90](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L90) - -### [sharee (editor role) MOVE a file by file-id into Personal space responds with 502 instead of 403](https://github.com/owncloud/ocis/issues/8124) - -- [apiSpacesDavOperation/moveByFileId.feature:543](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L543) -- [apiSpacesDavOperation/moveByFileId.feature:544](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L544) -- [apiSpacesDavOperation/moveByFileId.feature:545](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L545) -- [apiSpacesDavOperation/moveByFileId.feature:546](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L546) - -### [sharee (editor role) MOVE a file by file-id into Project space (manager/editor role) responds with 502 instead of 403](https://github.com/owncloud/ocis/issues/8125) - -- [apiSpacesDavOperation/moveByFileId.feature:570](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L570) -- [apiSpacesDavOperation/moveByFileId.feature:571](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L571) -- [apiSpacesDavOperation/moveByFileId.feature:573](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L573) -- [apiSpacesDavOperation/moveByFileId.feature:574](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L574) -- [apiSpacesDavOperation/moveByFileId.feature:579](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L579) -- [apiSpacesDavOperation/moveByFileId.feature:580](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L580) -- [apiSpacesDavOperation/moveByFileId.feature:582](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L582) -- [apiSpacesDavOperation/moveByFileId.feature:583](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L583) - ### [MOVE a file into same folder with same name returns 404 instead of 403](https://github.com/owncloud/ocis/issues/1976) - [apiSpacesShares/moveSpaces.feature:63](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L63) diff --git a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature index 7d46357de83..5e9ae60860b 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature @@ -127,11 +127,11 @@ Feature: moving/renaming file using file id | textfile.txt | Examples: | role | http-status-code | dav-path | - | manager | 403 | /remote.php/dav/spaces/<> | - | editor | 403 | /remote.php/dav/spaces/<> | + | manager | 502 | /remote.php/dav/spaces/<> | + | editor | 502 | /remote.php/dav/spaces/<> | | viewer | 403 | /remote.php/dav/spaces/<> | - | manager | 403 | /dav/spaces/<> | - | editor | 403 | /dav/spaces/<> | + | manager | 502 | /dav/spaces/<> | + | editor | 502 | /dav/spaces/<> | | viewer | 403 | /dav/spaces/<> | @issue-7618 @@ -141,7 +141,7 @@ Feature: moving/renaming file using file id And user "Alice" has uploaded a file inside space "Personal" with content "some data" to "textfile.txt" And we save it into "FILEID" When user "Alice" renames a file "/textfile.txt" into "/renamed.txt" inside space "project-space" using file-id path "" - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And the value of the item "/d:error/s:message" in the response about user "Alice" should be "move:error: not supported: cannot move across spaces" And for user "Alice" folder "/" of the space "Personal" should contain these files: | textfile.txt | @@ -297,19 +297,19 @@ Feature: moving/renaming file using file id | file.txt | Examples: | from_role | to_role | http-status-code | dav-path | - | manager | manager | 403 | /remote.php/dav/spaces/<> | - | editor | manager | 403 | /remote.php/dav/spaces/<> | - | manager | editor | 403 | /remote.php/dav/spaces/<> | - | editor | editor | 403 | /remote.php/dav/spaces/<> | + | manager | manager | 502 | /remote.php/dav/spaces/<> | + | editor | manager | 502 | /remote.php/dav/spaces/<> | + | manager | editor | 502 | /remote.php/dav/spaces/<> | + | editor | editor | 502 | /remote.php/dav/spaces/<> | | manager | viewer | 403 | /remote.php/dav/spaces/<> | | editor | viewer | 403 | /remote.php/dav/spaces/<> | | viewer | manager | 403 | /remote.php/dav/spaces/<> | | viewer | editor | 403 | /remote.php/dav/spaces/<> | | viewer | viewer | 403 | /remote.php/dav/spaces/<> | - | manager | manager | 403 | /dav/spaces/<> | - | editor | manager | 403 | /dav/spaces/<> | - | manager | editor | 403 | /dav/spaces/<> | - | editor | editor | 403 | /dav/spaces/<> | + | manager | manager | 502 | /dav/spaces/<> | + | editor | manager | 502 | /dav/spaces/<> | + | manager | editor | 502 | /dav/spaces/<> | + | editor | editor | 502 | /dav/spaces/<> | | manager | viewer | 403 | /dav/spaces/<> | | editor | viewer | 403 | /dav/spaces/<> | | viewer | manager | 403 | /dav/spaces/<> | @@ -325,7 +325,7 @@ Feature: moving/renaming file using file id And user "Alice" has uploaded a file inside space "second-project-space" with content "data from second project space" to "secondProjectSpacetextfile.txt" And we save it into "FILEID" When user "Alice" renames a file "/secondProjectSpacetextfile.txt" into "/renamedSecondProjectSpacetextfile.txt" inside space "first-project-space" using file-id path "" - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And the value of the item "/d:error/s:message" in the response about user "Alice" should be "move:error: not supported: cannot move across spaces" And for user "Alice" folder "/" of the space "first-project-space" should contain these files: | firstProjectSpacetextfile.txt | @@ -395,11 +395,11 @@ Feature: moving/renaming file using file id | textfile.txt | Examples: | role | http-status-code | dav-path | - | manager | 403 | /remote.php/dav/spaces/<> | - | editor | 403 | /remote.php/dav/spaces/<> | + | manager | 502 | /remote.php/dav/spaces/<> | + | editor | 502 | /remote.php/dav/spaces/<> | | viewer | 403 | /remote.php/dav/spaces/<> | - | manager | 403 | /dav/spaces/<> | - | editor | 403 | /dav/spaces/<> | + | manager | 502 | /dav/spaces/<> | + | editor | 502 | /dav/spaces/<> | | viewer | 403 | /dav/spaces/<> | @issue-7618 @@ -409,7 +409,7 @@ Feature: moving/renaming file using file id And user "Alice" has uploaded a file inside space "project-space" with content "some data" to "textfile.txt" And we save it into "FILEID" When user "Alice" renames a file "/textfile.txt" into "/renamed.txt" inside space "Personal" using file-id path "" - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And the value of the item "/d:error/s:message" in the response about user "Alice" should be "move:error: not supported: cannot move across spaces" And for user "Alice" folder "/" of the space "project-space" should contain these files: | textfile.txt | @@ -540,10 +540,10 @@ Feature: moving/renaming file using file id | test.txt | Examples: | permissions | dav-path | http-status-code | - | all | /remote.php/dav/spaces/<> | 403 | - | all | /dav/spaces/<> | 403 | - | change | /remote.php/dav/spaces/<> | 403 | - | change | /dav/spaces/<> | 403 | + | all | /remote.php/dav/spaces/<> | 502 | + | all | /dav/spaces/<> | 502 | + | change | /remote.php/dav/spaces/<> | 502 | + | change | /dav/spaces/<> | 502 | | read | /remote.php/dav/spaces/<> | 403 | | read | /dav/spaces/<> | 403 | @@ -567,20 +567,20 @@ Feature: moving/renaming file using file id | textfile.txt | Examples: | role | permissions | http-status-code | dav-path | - | manager | all | 403 | /remote.php/dav/spaces/<> | - | editor | all | 403 | /remote.php/dav/spaces/<> | + | manager | all | 502 | /remote.php/dav/spaces/<> | + | editor | all | 502 | /remote.php/dav/spaces/<> | | viewer | all | 403 | /remote.php/dav/spaces/<> | - | manager | change | 403 | /remote.php/dav/spaces/<> | - | editor | change | 403 | /remote.php/dav/spaces/<> | + | manager | change | 502 | /remote.php/dav/spaces/<> | + | editor | change | 502 | /remote.php/dav/spaces/<> | | viewer | change | 403 | /remote.php/dav/spaces/<> | | manager | read | 403 | /remote.php/dav/spaces/<> | | editor | read | 403 | /remote.php/dav/spaces/<> | | viewer | read | 403 | /remote.php/dav/spaces/<> | - | manager | all | 403 | /dav/spaces/<> | - | editor | all | 403 | /dav/spaces/<> | + | manager | all | 502 | /dav/spaces/<> | + | editor | all | 502 | /dav/spaces/<> | | viewer | all | 403 | /dav/spaces/<> | - | manager | change | 403 | /dav/spaces/<> | - | editor | change | 403 | /dav/spaces/<> | + | manager | change | 502 | /dav/spaces/<> | + | editor | change | 502 | /dav/spaces/<> | | viewer | change | 403 | /dav/spaces/<> | | manager | read | 403 | /dav/spaces/<> | | editor | read | 403 | /dav/spaces/<> | diff --git a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature index 20413c713e6..abc60ab9f30 100644 --- a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature @@ -84,10 +84,10 @@ Feature: move (rename) file | project1.txt | Examples: | from_role | to_role | http-status-code | - | manager | manager | 403 | - | editor | manager | 403 | - | manager | editor | 403 | - | editor | editor | 403 | + | manager | manager | 502 | + | editor | manager | 502 | + | manager | editor | 502 | + | editor | editor | 502 | | manager | viewer | 403 | | editor | viewer | 403 | | viewer | manager | 403 | @@ -110,8 +110,8 @@ Feature: move (rename) file | project.txt | Examples: | role | http-status-code | - | manager | 403 | - | editor | 403 | + | manager | 502 | + | editor | 502 | | viewer | 403 | @@ -158,8 +158,8 @@ Feature: move (rename) file | personal.txt | Examples: | role | http-status-code | - | manager | 403 | - | editor | 403 | + | manager | 502 | + | editor | 502 | | viewer | 403 |