You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

transfer-ownership.feature 11KB

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