transfer-ownership.feature 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. Feature: transfer-ownership
  2. Scenario: transfering ownership of a file
  3. Given user "user0" exists
  4. And user "user1" exists
  5. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  6. When transfering ownership from "user0" to "user1"
  7. And the command was successful
  8. And As an "user1"
  9. And using received transfer folder of "user1" as dav path
  10. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  11. Scenario: transfering ownership of a folder
  12. Given user "user0" exists
  13. And user "user1" exists
  14. And User "user0" created a folder "/test"
  15. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  16. When transfering ownership from "user0" to "user1"
  17. And the command was successful
  18. And As an "user1"
  19. And using received transfer folder of "user1" as dav path
  20. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  21. Scenario: transfering ownership of file shares
  22. Given user "user0" exists
  23. And user "user1" exists
  24. And user "user2" exists
  25. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  26. And file "/somefile.txt" of user "user0" is shared with user "user2" with permissions 19
  27. When transfering ownership from "user0" to "user1"
  28. And the command was successful
  29. And As an "user2"
  30. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  31. Scenario: transfering ownership of folder shared with third user
  32. Given user "user0" exists
  33. And user "user1" exists
  34. And user "user2" exists
  35. And User "user0" created a folder "/test"
  36. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  37. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  38. When transfering ownership from "user0" to "user1"
  39. And the command was successful
  40. And As an "user2"
  41. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  42. Scenario: transfering ownership of folder shared with transfer recipient
  43. Given user "user0" exists
  44. And user "user1" exists
  45. And User "user0" created a folder "/test"
  46. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  47. And folder "/test" of user "user0" is shared with user "user1" with permissions 31
  48. When transfering ownership from "user0" to "user1"
  49. And the command was successful
  50. And As an "user1"
  51. Then as "user1" the folder "/test" does not exist
  52. And using received transfer folder of "user1" as dav path
  53. And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  54. Scenario: transfering ownership of folder doubly shared with third user
  55. Given group "group1" exists
  56. And user "user0" exists
  57. And user "user1" exists
  58. And user "user2" exists
  59. And user "user2" belongs to group "group1"
  60. And User "user0" created a folder "/test"
  61. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  62. And folder "/test" of user "user0" is shared with group "group1" with permissions 31
  63. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  64. When transfering ownership from "user0" to "user1"
  65. And the command was successful
  66. And As an "user2"
  67. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  68. Scenario: transfering ownership of file shares to user with the same id as the group
  69. Given user "user0" exists
  70. And user "test" exists
  71. And user "user2" exists
  72. And group "test" exists
  73. And user "user2" belongs to group "test"
  74. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  75. And file "/somefile.txt" of user "user0" is shared with group "test"
  76. When transfering ownership from "user0" to "test"
  77. And the command was successful
  78. And As an "user2"
  79. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  80. Scenario: transfering ownership does not transfer received shares
  81. Given user "user0" exists
  82. And user "user1" exists
  83. And user "user2" exists
  84. And User "user2" created a folder "/test"
  85. And folder "/test" of user "user2" is shared with user "user0" with permissions 31
  86. When transfering ownership from "user0" to "user1"
  87. And the command was successful
  88. And As an "user1"
  89. And using received transfer folder of "user1" as dav path
  90. Then as "user1" the folder "/test" does not exist
  91. @local_storage
  92. Scenario: transfering ownership does not transfer external storage
  93. Given user "user0" exists
  94. And user "user1" exists
  95. When transfering ownership from "user0" to "user1"
  96. And the command was successful
  97. And As an "user1"
  98. And using received transfer folder of "user1" as dav path
  99. Then as "user1" the folder "/local_storage" does not exist
  100. Scenario: transfering ownership does not fail with shared trashed files
  101. Given user "user0" exists
  102. And user "user1" exists
  103. And user "user2" exists
  104. And User "user0" created a folder "/sub"
  105. And User "user0" created a folder "/sub/test"
  106. And folder "/sub/test" of user "user0" is shared with user "user2" with permissions 31
  107. And User "user0" deletes folder "/sub"
  108. When transfering ownership from "user0" to "user1"
  109. Then the command was successful
  110. Scenario: transfering ownership fails with invalid source user
  111. Given user "user0" exists
  112. When transfering ownership from "invalid_user" to "user0"
  113. Then the command error output contains the text "Unknown source user"
  114. And the command failed with exit code 1
  115. Scenario: transfering ownership fails with invalid target user
  116. Given user "user0" exists
  117. When transfering ownership from "user0" to "invalid_user"
  118. Then the command error output contains the text "Unknown target user"
  119. And the command failed with exit code 1
  120. Scenario: transfering ownership of a folder
  121. Given user "user0" exists
  122. And user "user1" exists
  123. And User "user0" created a folder "/test"
  124. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  125. When transfering ownership of path "test" from "user0" to "user1"
  126. And the command was successful
  127. And As an "user1"
  128. And using received transfer folder of "user1" as dav path
  129. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  130. Scenario: transfering ownership of file shares
  131. Given user "user0" exists
  132. And user "user1" exists
  133. And user "user2" exists
  134. And User "user0" created a folder "/test"
  135. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  136. And file "/test/somefile.txt" of user "user0" is shared with user "user2" with permissions 19
  137. When transfering ownership of path "test" from "user0" to "user1"
  138. And the command was successful
  139. And As an "user2"
  140. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  141. Scenario: transfering ownership of folder shared with third user
  142. Given user "user0" exists
  143. And user "user1" exists
  144. And user "user2" exists
  145. And User "user0" created a folder "/test"
  146. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  147. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  148. When transfering ownership of path "test" from "user0" to "user1"
  149. And the command was successful
  150. And As an "user2"
  151. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  152. Scenario: transfering ownership of folder shared with transfer recipient
  153. Given user "user0" exists
  154. And user "user1" exists
  155. And User "user0" created a folder "/test"
  156. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  157. And folder "/test" of user "user0" is shared with user "user1" with permissions 31
  158. When transfering ownership of path "test" from "user0" to "user1"
  159. And the command was successful
  160. And As an "user1"
  161. Then as "user1" the folder "/test" does not exist
  162. And using received transfer folder of "user1" as dav path
  163. And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  164. Scenario: transfering ownership of folder doubly shared with third user
  165. Given group "group1" exists
  166. And user "user0" exists
  167. And user "user1" exists
  168. And user "user2" exists
  169. And user "user2" belongs to group "group1"
  170. And User "user0" created a folder "/test"
  171. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  172. And folder "/test" of user "user0" is shared with group "group1" with permissions 31
  173. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  174. When transfering ownership of path "test" from "user0" to "user1"
  175. And the command was successful
  176. And As an "user2"
  177. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  178. Scenario: transfering ownership does not transfer received shares
  179. Given user "user0" exists
  180. And user "user1" exists
  181. And user "user2" exists
  182. And User "user2" created a folder "/test"
  183. And User "user0" created a folder "/sub"
  184. And folder "/test" of user "user2" is shared with user "user0" with permissions 31
  185. And User "user0" moved folder "/test" to "/sub/test"
  186. When transfering ownership of path "sub" from "user0" to "user1"
  187. And the command was successful
  188. And As an "user1"
  189. And using received transfer folder of "user1" as dav path
  190. Then as "user1" the folder "/sub/test" does not exist
  191. Scenario: transfering ownership does not transfer external storage
  192. Given user "user0" exists
  193. And user "user1" exists
  194. And User "user0" created a folder "/sub"
  195. When transfering ownership of path "sub" from "user0" to "user1"
  196. And the command was successful
  197. And As an "user1"
  198. And using received transfer folder of "user1" as dav path
  199. Then as "user1" the folder "/local_storage" does not exist
  200. Scenario: transfering ownership fails with invalid source user
  201. Given user "user0" exists
  202. And User "user0" created a folder "/sub"
  203. When transfering ownership of path "sub" from "invalid_user" to "user0"
  204. Then the command error output contains the text "Unknown source user"
  205. And the command failed with exit code 1
  206. Scenario: transfering ownership fails with invalid target user
  207. Given user "user0" exists
  208. And User "user0" created a folder "/sub"
  209. When transfering ownership of path "sub" from "user0" to "invalid_user"
  210. Then the command error output contains the text "Unknown target user"
  211. And the command failed with exit code 1
  212. Scenario: transfering ownership fails with invalid path
  213. Given user "user0" exists
  214. And user "user1" exists
  215. When transfering ownership of path "test" from "user0" to "user1"
  216. Then the command error output contains the text "Unknown target user"
  217. And the command failed with exit code 1