download.feature 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. # SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  2. # SPDX-License-Identifier: AGPL-3.0-or-later
  3. Feature: download
  4. Scenario: downloading 2 small files returns a zip32
  5. Given using new dav path
  6. And user "user0" exists
  7. And User "user0" copies file "/welcome.txt" to "/welcome2.txt"
  8. When user "user0" downloads zip file for entries '"welcome.txt","welcome2.txt"' in folder "/"
  9. Then the downloaded zip file is a zip32 file
  10. And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data
  11. And the downloaded zip file contains a file named "welcome2.txt" with the contents of "/welcome2.txt" from "user0" data
  12. Scenario: downloading a small file and a directory returns a zip32
  13. Given using new dav path
  14. And user "user0" exists
  15. And user "user0" created a folder "/emptySubFolder"
  16. When user "user0" downloads zip file for entries '"welcome.txt","emptySubFolder"' in folder "/"
  17. Then the downloaded zip file is a zip32 file
  18. And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data
  19. And the downloaded zip file contains a folder named "emptySubFolder/"
  20. Scenario: downloading a small file and 2 nested directories returns a zip32
  21. Given using new dav path
  22. And user "user0" exists
  23. And user "user0" created a folder "/subFolder"
  24. And user "user0" created a folder "/subFolder/emptySubSubFolder"
  25. When user "user0" downloads zip file for entries '"welcome.txt","subFolder"' in folder "/"
  26. Then the downloaded zip file is a zip32 file
  27. And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data
  28. And the downloaded zip file contains a folder named "subFolder/"
  29. And the downloaded zip file contains a folder named "subFolder/emptySubSubFolder/"
  30. Scenario: downloading dir with 2 small files returns a zip32
  31. Given using new dav path
  32. And user "user0" exists
  33. And user "user0" created a folder "/sparseFolder"
  34. And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt"
  35. And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome2.txt"
  36. When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/"
  37. Then the downloaded zip file is a zip32 file
  38. And the downloaded zip file contains a folder named "sparseFolder/"
  39. And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data
  40. And the downloaded zip file contains a file named "sparseFolder/welcome2.txt" with the contents of "/sparseFolder/welcome2.txt" from "user0" data
  41. Scenario: downloading dir with a small file and a directory returns a zip32
  42. Given using new dav path
  43. And user "user0" exists
  44. And user "user0" created a folder "/sparseFolder"
  45. And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt"
  46. And user "user0" created a folder "/sparseFolder/emptySubFolder"
  47. When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/"
  48. Then the downloaded zip file is a zip32 file
  49. And the downloaded zip file contains a folder named "sparseFolder/"
  50. And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data
  51. And the downloaded zip file contains a folder named "sparseFolder/emptySubFolder/"
  52. Scenario: downloading dir with a small file and 2 nested directories returns a zip32
  53. Given using new dav path
  54. And user "user0" exists
  55. And user "user0" created a folder "/sparseFolder"
  56. And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt"
  57. And user "user0" created a folder "/sparseFolder/subFolder"
  58. And user "user0" created a folder "/sparseFolder/subFolder/emptySubSubFolder"
  59. When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/"
  60. Then the downloaded zip file is a zip32 file
  61. And the downloaded zip file contains a folder named "sparseFolder/"
  62. And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data
  63. And the downloaded zip file contains a folder named "sparseFolder/subFolder/"
  64. And the downloaded zip file contains a folder named "sparseFolder/subFolder/emptySubSubFolder/"
  65. Scenario: downloading (from folder) 2 small files returns a zip32
  66. Given using new dav path
  67. And user "user0" exists
  68. And user "user0" created a folder "/baseFolder"
  69. And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt"
  70. And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome2.txt"
  71. When user "user0" downloads zip file for entries '"welcome.txt","welcome2.txt"' in folder "/baseFolder/"
  72. Then the downloaded zip file is a zip32 file
  73. And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data
  74. And the downloaded zip file contains a file named "welcome2.txt" with the contents of "/baseFolder/welcome2.txt" from "user0" data
  75. Scenario: downloading (from folder) a small file and a directory returns a zip32
  76. Given using new dav path
  77. And user "user0" exists
  78. And user "user0" created a folder "/baseFolder"
  79. And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt"
  80. And user "user0" created a folder "/baseFolder/emptySubFolder"
  81. When user "user0" downloads zip file for entries '"welcome.txt","emptySubFolder"' in folder "/baseFolder/"
  82. Then the downloaded zip file is a zip32 file
  83. And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data
  84. And the downloaded zip file contains a folder named "emptySubFolder/"
  85. Scenario: downloading (from folder) a small file and 2 nested directories returns a zip32
  86. Given using new dav path
  87. And user "user0" exists
  88. And user "user0" created a folder "/baseFolder"
  89. And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt"
  90. And user "user0" created a folder "/baseFolder/subFolder"
  91. And user "user0" created a folder "/baseFolder/subFolder/emptySubSubFolder"
  92. When user "user0" downloads zip file for entries '"welcome.txt","subFolder"' in folder "/baseFolder/"
  93. Then the downloaded zip file is a zip32 file
  94. And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data
  95. And the downloaded zip file contains a folder named "subFolder/"
  96. And the downloaded zip file contains a folder named "subFolder/emptySubSubFolder/"
  97. Scenario: downloading (from folder) dir with 2 small files returns a zip32
  98. Given using new dav path
  99. And user "user0" exists
  100. And user "user0" created a folder "/baseFolder"
  101. And user "user0" created a folder "/baseFolder/sparseFolder"
  102. And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt"
  103. And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome2.txt"
  104. When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/"
  105. Then the downloaded zip file is a zip32 file
  106. And the downloaded zip file contains a folder named "sparseFolder/"
  107. And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data
  108. And the downloaded zip file contains a file named "sparseFolder/welcome2.txt" with the contents of "/baseFolder/sparseFolder/welcome2.txt" from "user0" data
  109. Scenario: downloading (from folder) dir with a small file and a directory returns a zip32
  110. Given using new dav path
  111. And user "user0" exists
  112. And user "user0" created a folder "/baseFolder"
  113. And user "user0" created a folder "/baseFolder/sparseFolder"
  114. And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt"
  115. And user "user0" created a folder "/baseFolder/sparseFolder/emptySubFolder"
  116. When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/"
  117. Then the downloaded zip file is a zip32 file
  118. And the downloaded zip file contains a folder named "sparseFolder/"
  119. And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data
  120. And the downloaded zip file contains a folder named "sparseFolder/emptySubFolder/"
  121. Scenario: downloading (from folder) dir with a small file and 2 nested directories returns a zip32
  122. Given using new dav path
  123. And user "user0" exists
  124. And user "user0" created a folder "/baseFolder"
  125. And user "user0" created a folder "/baseFolder/sparseFolder"
  126. And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt"
  127. And user "user0" created a folder "/baseFolder/sparseFolder/subFolder"
  128. And user "user0" created a folder "/baseFolder/sparseFolder/subFolder/emptySubSubFolder"
  129. When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/"
  130. Then the downloaded zip file is a zip32 file
  131. And the downloaded zip file contains a folder named "sparseFolder/"
  132. And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data
  133. And the downloaded zip file contains a folder named "sparseFolder/subFolder/"
  134. And the downloaded zip file contains a folder named "sparseFolder/subFolder/emptySubSubFolder/"
  135. @large
  136. Scenario: downloading small file and dir with 65524 small files and 9 nested directories returns a zip32
  137. Given using new dav path
  138. And user "user0" exists
  139. And user "user0" created a folder "/crowdedFolder"
  140. And user "user0" created a folder "/crowdedFolder/subFolder1"
  141. And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data
  142. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1"
  143. And user "user0" created a folder "/crowdedFolder/subFolder2"
  144. And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data
  145. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2"
  146. And user "user0" created a folder "/crowdedFolder/subFolder3"
  147. And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data
  148. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3"
  149. And user "user0" created a folder "/crowdedFolder/subFolder4"
  150. And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data
  151. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4"
  152. And user "user0" created a folder "/crowdedFolder/subFolder5"
  153. And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data
  154. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5"
  155. And user "user0" created a folder "/crowdedFolder/subFolder6"
  156. And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data
  157. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6"
  158. And user "user0" created a folder "/crowdedFolder/subFolder7"
  159. And file "/crowdedFolder/subFolder7/test.txt" is created "5524" times in "user0" user data
  160. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7"
  161. And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder"
  162. And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder"
  163. When user "user0" downloads zip file for entries '"welcome.txt","crowdedFolder"' in folder "/"
  164. Then the downloaded zip file is a zip32 file
  165. And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data
  166. And the downloaded zip file contains a folder named "crowdedFolder/"
  167. And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/"
  168. And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data
  169. And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5523" with the contents of "/crowdedFolder/subFolder7/test.txt-5523" from "user0" data
  170. And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/"
  171. @large
  172. Scenario: downloading dir with 65525 small files and 9 nested directories returns a zip32
  173. Given using new dav path
  174. And user "user0" exists
  175. And user "user0" created a folder "/crowdedFolder"
  176. And user "user0" created a folder "/crowdedFolder/subFolder1"
  177. And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data
  178. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1"
  179. And user "user0" created a folder "/crowdedFolder/subFolder2"
  180. And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data
  181. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2"
  182. And user "user0" created a folder "/crowdedFolder/subFolder3"
  183. And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data
  184. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3"
  185. And user "user0" created a folder "/crowdedFolder/subFolder4"
  186. And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data
  187. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4"
  188. And user "user0" created a folder "/crowdedFolder/subFolder5"
  189. And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data
  190. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5"
  191. And user "user0" created a folder "/crowdedFolder/subFolder6"
  192. And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data
  193. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6"
  194. And user "user0" created a folder "/crowdedFolder/subFolder7"
  195. And file "/crowdedFolder/subFolder7/test.txt" is created "5525" times in "user0" user data
  196. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7"
  197. And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder"
  198. And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder"
  199. When user "user0" downloads zip file for entries '"crowdedFolder"' in folder "/"
  200. Then the downloaded zip file is a zip32 file
  201. And the downloaded zip file contains a folder named "crowdedFolder/"
  202. And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/"
  203. And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data
  204. And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5524" with the contents of "/crowdedFolder/subFolder7/test.txt-5524" from "user0" data
  205. And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/"
  206. @large
  207. Scenario: downloading small file and dir with 65524 small files and 10 nested directories returns a zip64
  208. Given using new dav path
  209. And user "user0" exists
  210. And user "user0" created a folder "/crowdedFolder"
  211. And user "user0" created a folder "/crowdedFolder/subFolder1"
  212. And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data
  213. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1"
  214. And user "user0" created a folder "/crowdedFolder/subFolder2"
  215. And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data
  216. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2"
  217. And user "user0" created a folder "/crowdedFolder/subFolder3"
  218. And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data
  219. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3"
  220. And user "user0" created a folder "/crowdedFolder/subFolder4"
  221. And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data
  222. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4"
  223. And user "user0" created a folder "/crowdedFolder/subFolder5"
  224. And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data
  225. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5"
  226. And user "user0" created a folder "/crowdedFolder/subFolder6"
  227. And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data
  228. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6"
  229. And user "user0" created a folder "/crowdedFolder/subFolder7"
  230. And file "/crowdedFolder/subFolder7/test.txt" is created "5524" times in "user0" user data
  231. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7"
  232. And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder"
  233. And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder"
  234. And user "user0" created a folder "/crowdedFolder/subFolder7/emptySubSubFolder"
  235. When user "user0" downloads zip file for entries '"welcome.txt","crowdedFolder"' in folder "/"
  236. Then the downloaded zip file is a zip64 file
  237. And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data
  238. And the downloaded zip file contains a folder named "crowdedFolder/"
  239. And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/"
  240. And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data
  241. And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5523" with the contents of "/crowdedFolder/subFolder7/test.txt-5523" from "user0" data
  242. And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/"
  243. And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/emptySubSubFolder/"
  244. @large
  245. Scenario: downloading dir with 65525 small files and 10 nested directories returns a zip64
  246. Given using new dav path
  247. And user "user0" exists
  248. And user "user0" created a folder "/crowdedFolder"
  249. And user "user0" created a folder "/crowdedFolder/subFolder1"
  250. And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data
  251. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1"
  252. And user "user0" created a folder "/crowdedFolder/subFolder2"
  253. And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data
  254. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2"
  255. And user "user0" created a folder "/crowdedFolder/subFolder3"
  256. And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data
  257. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3"
  258. And user "user0" created a folder "/crowdedFolder/subFolder4"
  259. And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data
  260. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4"
  261. And user "user0" created a folder "/crowdedFolder/subFolder5"
  262. And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data
  263. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5"
  264. And user "user0" created a folder "/crowdedFolder/subFolder6"
  265. And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data
  266. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6"
  267. And user "user0" created a folder "/crowdedFolder/subFolder7"
  268. And file "/crowdedFolder/subFolder7/test.txt" is created "5525" times in "user0" user data
  269. And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7"
  270. And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder"
  271. And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder"
  272. And user "user0" created a folder "/crowdedFolder/subFolder7/emptySubSubFolder"
  273. When user "user0" downloads zip file for entries '"crowdedFolder"' in folder "/"
  274. Then the downloaded zip file is a zip64 file
  275. And the downloaded zip file contains a folder named "crowdedFolder/"
  276. And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/"
  277. And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data
  278. And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5524" with the contents of "/crowdedFolder/subFolder7/test.txt-5524" from "user0" data
  279. And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/"
  280. And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/emptySubSubFolder/"