summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-09-18 18:35:06 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2020-09-18 18:55:55 +0200
commit083d1dab1c3f06abae95dec52c63669a002a8914 (patch)
tree013affaace376db45e2852e2cd93cf617414c9b3
parentf400c44e8b7acbdf3fb15ec3dee4153656d46b8d (diff)
downloadnextcloud-server-083d1dab1c3f06abae95dec52c63669a002a8914.tar.gz
nextcloud-server-083d1dab1c3f06abae95dec52c63669a002a8914.zip
Add integration tests to check that only the given path is transferred
Until recently (it was fixed in ac2999a26a) when a path was transferred other shares with the target user were removed, so a test was added to ensure that it does not happen again. Besides that a test to ensure that other files with the target user are not transferred was added too (it did not fail before, but seemed convenient to have that covered too :-) ). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--build/integration/features/transfer-ownership.feature51
1 files changed, 51 insertions, 0 deletions
diff --git a/build/integration/features/transfer-ownership.feature b/build/integration/features/transfer-ownership.feature
index 49326c96d93..b091d00dae8 100644
--- a/build/integration/features/transfer-ownership.feature
+++ b/build/integration/features/transfer-ownership.feature
@@ -351,6 +351,57 @@ Feature: transfer-ownership
And using received transfer folder of "user1" as dav path
And as "user1" the folder "/test" exists
+ Scenario: transfering ownership of path does not affect other files
+ Given user "user0" exists
+ And user "user1" exists
+ And User "user0" created a folder "/test"
+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
+ And User "user0" created a folder "/test2"
+ And User "user0" uploads file "data/textfile.txt" to "/test2/somefile.txt"
+ When transfering ownership of path "test" from "user0" to "user1"
+ And the command was successful
+ And As an "user1"
+ And using received transfer folder of "user1" as dav path
+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
+ And using old dav path
+ And as "user0" the folder "/test" does not exist
+ And as "user0" the folder "/test2" exists
+ And as "user0" the file "/test2/somefile.txt" exists
+ And using received transfer folder of "user1" as dav path
+ And as "user1" the folder "/test" exists
+ And as "user1" the folder "/test2" does not exist
+
+ Scenario: transfering ownership of path does not affect other shares
+ Given user "user0" exists
+ And user "user1" exists
+ And User "user0" created a folder "/test"
+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
+ And User "user0" created a folder "/test2"
+ And User "user0" uploads file "data/textfile.txt" to "/test2/sharedfile.txt"
+ And file "/test2/sharedfile.txt" of user "user0" is shared with user "user1" with permissions 19
+ And user "user1" accepts last share
+ When transfering ownership of path "test" from "user0" to "user1"
+ And the command was successful
+ And As an "user1"
+ And using received transfer folder of "user1" as dav path
+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
+ And using old dav path
+ And as "user0" the folder "/test" does not exist
+ And as "user0" the folder "/test2" exists
+ And as "user0" the file "/test2/sharedfile.txt" exists
+ And using received transfer folder of "user1" as dav path
+ And as "user1" the folder "/test" exists
+ And as "user1" the folder "/test2" does not exist
+ And using old dav path
+ And as "user1" the file "/sharedfile.txt" exists
+ And As an "user1"
+ And Getting info of last share
+ And the OCS status code should be "100"
+ And Share fields of last share match with
+ | uid_owner | user0 |
+ | uid_file_owner | user0 |
+ | share_with | user1 |
+
Scenario: transfering ownership of file shares
Given user "user0" exists
And user "user1" exists