@@ -126,3 +126,118 @@ Feature: transfer-ownership
126126 Then the command error output contains the text "Unknown target user"
127127 And the command failed with exit code 1
128128
129+ @no_encryption
130+ Scenario : transfering ownership of a folder
131+ Given user "user0" exists
132+ And user "user1" exists
133+ And User "user0" created a folder "/test"
134+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
135+ When transfering ownership of path "test" from "user0" to "user1"
136+ And the command was successful
137+ And As an "user1"
138+ And using received transfer folder of "user1" as dav path
139+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
140+
141+ @no_encryption
142+ Scenario : transfering ownership of file shares
143+ Given user "user0" exists
144+ And user "user1" exists
145+ And user "user2" exists
146+ And User "user0" created a folder "/test"
147+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
148+ And file "/test/somefile.txt" of user "user0" is shared with user "user2" with permissions 19
149+ When transfering ownership of path "test" from "user0" to "user1"
150+ And the command was successful
151+ And As an "user2"
152+ Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
153+
154+ @no_encryption
155+ Scenario : transfering ownership of folder shared with third user
156+ Given user "user0" exists
157+ And user "user1" exists
158+ And user "user2" exists
159+ And User "user0" created a folder "/test"
160+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
161+ And folder "/test" of user "user0" is shared with user "user2" with permissions 31
162+ When transfering ownership of path "test" from "user0" to "user1"
163+ And the command was successful
164+ And As an "user2"
165+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
166+
167+ @no_encryption
168+ Scenario : transfering ownership of folder shared with transfer recipient
169+ Given user "user0" exists
170+ And user "user1" exists
171+ And User "user0" created a folder "/test"
172+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
173+ And folder "/test" of user "user0" is shared with user "user1" with permissions 31
174+ When transfering ownership of path "test" from "user0" to "user1"
175+ And the command was successful
176+ And As an "user1"
177+ Then as "user1" the folder "/test" does not exist
178+ And using received transfer folder of "user1" as dav path
179+ And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
180+
181+ @no_encryption
182+ Scenario : transfering ownership of folder doubly shared with third user
183+ Given group "group1" exists
184+ And user "user0" exists
185+ And user "user1" exists
186+ And user "user2" exists
187+ And user "user2" belongs to group "group1"
188+ And User "user0" created a folder "/test"
189+ And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
190+ And folder "/test" of user "user0" is shared with group "group1" with permissions 31
191+ And folder "/test" of user "user0" is shared with user "user2" with permissions 31
192+ When transfering ownership of path "test" from "user0" to "user1"
193+ And the command was successful
194+ And As an "user2"
195+ Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
196+
197+ @no_encryption
198+ Scenario : transfering ownership does not transfer received shares
199+ Given user "user0" exists
200+ And user "user1" exists
201+ And user "user2" exists
202+ And User "user2" created a folder "/test"
203+ And User "user0" created a folder "/sub"
204+ And folder "/test" of user "user2" is shared with user "user0" with permissions 31
205+ And User "user0" moved folder "/test" to "/sub/test"
206+ When transfering ownership of path "sub" from "user0" to "user1"
207+ And the command was successful
208+ And As an "user1"
209+ And using received transfer folder of "user1" as dav path
210+ Then as "user1" the folder "/sub/test" does not exist
211+
212+ @no_encryption
213+ @local_storage
214+ Scenario : transfering ownership does not transfer external storage
215+ Given user "user0" exists
216+ And user "user1" exists
217+ And User "user0" created a folder "/sub"
218+ When transfering ownership of path "sub" from "user0" to "user1"
219+ And the command was successful
220+ And As an "user1"
221+ And using received transfer folder of "user1" as dav path
222+ Then as "user1" the folder "/local_storage" does not exist
223+
224+ Scenario : transfering ownership fails with invalid source user
225+ Given user "user0" exists
226+ And User "user0" created a folder "/sub"
227+ When transfering ownership of path "sub" from "invalid_user" to "user0"
228+ Then the command error output contains the text "Unknown source user"
229+ And the command failed with exit code 1
230+
231+ Scenario : transfering ownership fails with invalid target user
232+ Given user "user0" exists
233+ And User "user0" created a folder "/sub"
234+ When transfering ownership of path "sub" from "user0" to "invalid_user"
235+ Then the command error output contains the text "Unknown target user"
236+ And the command failed with exit code 1
237+
238+ Scenario : transfering ownership fails with invalid path
239+ Given user "user0" exists
240+ And user "user1" exists
241+ When transfering ownership of path "test" from "user0" to "user1"
242+ Then the command error output contains the text "Unknown target user"
243+ And the command failed with exit code 1
0 commit comments