From 921f7d9d20efc701f26f7502385cfde07740baae Mon Sep 17 00:00:00 2001 From: Sawjan Gurung Date: Fri, 26 Jan 2024 20:56:39 +0545 Subject: [PATCH] test: adjust MOVE between spaces test expectations --- .../apiSpacesDavOperation/moveByFileId.feature | 12 ++++++------ .../features/apiSpacesShares/moveSpaces.feature | 10 +++++----- .../moveShareInsideAnotherShare.feature | 7 +++---- .../changingFilesShare.feature | 2 +- .../coreApiWebdavMove2/moveShareOnOcis.feature | 8 ++++---- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature index 0a92b25b02..28ce813d74 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature @@ -94,8 +94,8 @@ Feature: moving/renaming file using file id And user "Brian" has uploaded file with content "some data" to "/test.txt" And we save it into "FILEID" When user "Brian" moves a file "test.txt" into "folder" inside space "Shares" using file-id path "" - Then the HTTP status code should be "403" - And the value of the item "/d:error/s:message" in the response about user "Brian" should be "cross storage moves are not permitted, use copy and delete" + Then the HTTP status code should be "502" + And the value of the item "/d:error/s:message" in the response about user "Brian" should be "move:error: not supported: cannot move across spaces" And for user "Brian" folder "/" of the space "Personal" should contain these files: | test.txt | But for user "Alice" folder "folder" of the space "Personal" should not contain these files: @@ -351,7 +351,7 @@ Feature: moving/renaming file using file id And user "Alice" has created folder "testshare" And user "Alice" has shared folder "testshare" with user "Brian" with permissions "" When user "Brian" moves a file "textfile.txt" into "testshare" inside space "Shares" using file-id path "" - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Brian" folder "/" of the space "project-space" should contain these files: | textfile.txt | But for user "Brian" folder "testshare" of the space "Shares" should not contain these files: @@ -475,7 +475,7 @@ Feature: moving/renaming file using file id And we save it into "FILEID" And user "Alice" has shared folder "folder" with user "Brian" with permissions "read" When user "Brian" moves a file "Shares/folder/test.txt" into "folder/sub-folder" inside space "Shares" using file-id path "" - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Brian" folder "folder/sub-folder" of the space "Shares" should not contain these files: | test.txt | And for user "Alice" folder "folder/sub-folder" of the space "Personal" should not contain these files: @@ -499,7 +499,7 @@ Feature: moving/renaming file using file id And user "Alice" has shared folder "testshare1" with user "Brian" with permissions "" And user "Alice" has shared folder "testshare2" with user "Brian" with permissions "" When user "Brian" moves a file "Shares/testshare1/textfile.txt" into "testshare2" inside space "Shares" using file-id path "" - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Brian" folder "testshare1" of the space "Shares" should contain these files: | textfile.txt | But for user "Brian" folder "testshare2" of the space "Shares" should not contain these files: @@ -697,7 +697,7 @@ Feature: moving/renaming file using file id And we save it into "FILEID" And user "Alice" has shared folder "/folder" with user "Brian" with permissions "read" When user "Brian" renames a file "Shares/folder/test.txt" into "folder/sub-folder/renamed.txt" inside space "Shares" using file-id path "" - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Brian" folder "folder" of the space "Shares" should contain these files: | test.txt | But for user "Brian" folder "folder/sub-folder" of the space "Shares" should not contain these files: diff --git a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature index 47130d389d..20413c713e 100644 --- a/tests/acceptance/features/apiSpacesShares/moveSpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/moveSpaces.feature @@ -125,7 +125,7 @@ Feature: move (rename) file | role | | And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" When user "Alice" moves file "project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Alice" the space "Project" should contain these entries: | project.txt | But for user "Alice" folder "testshare" of the space "Shares" should not contain these entries: @@ -168,7 +168,7 @@ Feature: move (rename) file And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" And user "Alice" has uploaded file with content "personal content" to "personal.txt" When user "Alice" moves file "personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Alice" the space "Personal" should contain these entries: | personal.txt | But for user "Alice" folder "testshare" of the space "Shares" should not contain these entries: @@ -185,7 +185,7 @@ Feature: move (rename) file And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt" And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" When user "Alice" moves file "/testshare/testshare.txt" from space "Shares" to "testshare.txt" inside space "Personal" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Alice" the space "Personal" should not contain these entries: | testshare.txt | And for user "Alice" folder "testshare" of the space "Shares" should contain these entries: @@ -207,7 +207,7 @@ Feature: move (rename) file And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt" And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "" When user "Alice" moves file "/testshare/testshare.txt" from space "Shares" to "testshare.txt" inside space "Project" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Alice" the space "Project" should not contain these entries: | /testshare.txt | And for user "Alice" folder "testshare" of the space "Shares" should contain these entries: @@ -232,7 +232,7 @@ Feature: move (rename) file And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "" And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "" When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares" to "/testshare2/testshare1.txt" inside space "Shares" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And for user "Alice" folder "testshare1" of the space "Shares" should contain these entries: | testshare1.txt | But for user "Alice" folder "testshare2" of the space "Shares" should not contain these entries: diff --git a/tests/acceptance/features/coreApiShareManagementToShares/moveShareInsideAnotherShare.feature b/tests/acceptance/features/coreApiShareManagementToShares/moveShareInsideAnotherShare.feature index b13cbd7e17..0c16fe0f04 100644 --- a/tests/acceptance/features/coreApiShareManagementToShares/moveShareInsideAnotherShare.feature +++ b/tests/acceptance/features/coreApiShareManagementToShares/moveShareInsideAnotherShare.feature @@ -20,7 +20,7 @@ Feature: moving a share inside another share Scenario: share receiver cannot move a whole share inside another share When user "Brian" moves folder "Shares/folderB" to "Shares/folderA/folderB" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And as "Alice" folder "/folderB" should exist And as "Brian" folder "/Shares/folderB" should exist And as "Alice" file "/folderB/fileB.txt" should exist @@ -43,7 +43,7 @@ Feature: moving a share inside another share And user "Brian" has created folder "localFolder/subFolder" And user "Brian" has uploaded file with content "local text" to "/localFolder/localFile.txt" When user "Brian" moves folder "localFolder" to "Shares/folderA/localFolder" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And as "Brian" folder "/Shares/folderA/localFolder" should not exist And as "Alice" folder "/folderA/localFolder" should not exist And as "Brian" folder "/localFolder" should exist @@ -52,8 +52,7 @@ Feature: moving a share inside another share Scenario: share receiver tries to move a whole share inside a local folder Given user "Brian" has created folder "localFolder" And user "Brian" has uploaded file with content "local text" to "/localFolder/localFile.txt" - # On oCIS you cannot move received shares out of the "Shares" folder When user "Brian" moves folder "Shares/folderB" to "localFolder/folderB" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And as "Alice" file "/folderB/fileB.txt" should exist And as "Brian" file "/Shares/folderB/fileB.txt" should exist diff --git a/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature b/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature index 54f5cf2c2a..0aea127ba2 100644 --- a/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature +++ b/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature @@ -20,7 +20,7 @@ Feature: sharing And user "Alice" has shared folder "/share1" with user "Brian" And user "Alice" has shared folder "/share2" with user "Brian" When user "Brian" moves file "/Shares/share1/textfile0.txt" to "/Shares/share2/textfile0.txt" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And as "Brian" file "/Shares/share1/textfile0.txt" should exist And as "Alice" file "share1/textfile0.txt" should exist But as "Brian" file "/Shares/share2/textfile0.txt" should not exist diff --git a/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature b/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature index feba1ab4f6..da4e86296d 100644 --- a/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature +++ b/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature @@ -45,7 +45,7 @@ Feature: move (rename) file | shareWith | Alice | And user "Alice" has uploaded file with content "test data" to "/testfile.txt" When user "Alice" moves file "/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And as "Alice" file "Shares/testshare/testfile.txt" should not exist And as "Brian" file "testshare/testfile.txt" should not exist But as "Alice" file "/testfile.txt" should exist @@ -95,7 +95,7 @@ Feature: move (rename) file | permissions | | | shareWith | Alice | When user "Alice" moves file "/Shares/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And as "Alice" file "/Shares/testshare/testfile.txt" should exist And as "Brian" file "/testshare/testfile.txt" should exist Examples: @@ -146,7 +146,7 @@ Feature: move (rename) file And user "Alice" has created folder "/testsubfolder" And user "Alice" has uploaded file with content "test data" to "/testsubfolder/testfile.txt" When user "Alice" moves folder "/testsubfolder" to "Shares/testshare/testsubfolder" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And as "Alice" folder "/Shares/testshare/testsubfolder" should not exist And as "Brian" folder "/testshare/testsubfolder" should not exist But as "Alice" folder "/testsubfolder" should exist @@ -202,7 +202,7 @@ Feature: move (rename) file | permissions | | | shareWith | Alice | When user "Alice" moves folder "/Shares/testshare/testsubfolder" to "/testsubfolder" using the WebDAV API - Then the HTTP status code should be "403" + Then the HTTP status code should be "502" And as "Alice" folder "/Shares/testshare/testsubfolder" should exist And as "Brian" folder "/testshare/testsubfolder" should exist Examples: