1
0

webdav-related.feature 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. Feature: webdav-related
  2. Background:
  3. Given using api version "1"
  4. Scenario: Unauthenticated call old dav path
  5. Given using old dav path
  6. When connecting to dav endpoint
  7. Then the HTTP status code should be "401"
  8. And there are no duplicate headers
  9. And The following headers should be set
  10. |WWW-Authenticate|Basic realm="Nextcloud", charset="UTF-8"|
  11. Scenario: Unauthenticated call new dav path
  12. Given using new dav path
  13. When connecting to dav endpoint
  14. Then the HTTP status code should be "401"
  15. And there are no duplicate headers
  16. And The following headers should be set
  17. |WWW-Authenticate|Basic realm="Nextcloud", charset="UTF-8"|
  18. Scenario: Moving a file
  19. Given using old dav path
  20. And As an "admin"
  21. And user "user0" exists
  22. And As an "user0"
  23. When User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt"
  24. Then the HTTP status code should be "201"
  25. And Downloaded content when downloading file "/FOLDER/welcome.txt" with range "bytes=0-6" should be "Welcome"
  26. Scenario: Moving and overwriting a file old way
  27. Given using old dav path
  28. And As an "admin"
  29. And user "user0" exists
  30. And As an "user0"
  31. When User "user0" moves file "/welcome.txt" to "/textfile0.txt"
  32. Then the HTTP status code should be "204"
  33. And Downloaded content when downloading file "/textfile0.txt" with range "bytes=0-6" should be "Welcome"
  34. Scenario: Moving a file to a folder with no permissions
  35. Given using old dav path
  36. And As an "admin"
  37. And user "user0" exists
  38. And user "user1" exists
  39. And As an "user1"
  40. And user "user1" created a folder "/testshare"
  41. And as "user1" creating a share with
  42. | path | testshare |
  43. | shareType | 0 |
  44. | permissions | 1 |
  45. | shareWith | user0 |
  46. And user "user0" accepts last share
  47. And As an "user0"
  48. And User "user0" moves file "/textfile0.txt" to "/testshare/textfile0.txt"
  49. And the HTTP status code should be "403"
  50. When Downloading file "/testshare/textfile0.txt"
  51. Then the HTTP status code should be "404"
  52. Scenario: Moving a file to overwrite a file in a folder with no permissions
  53. Given using old dav path
  54. And As an "admin"
  55. And user "user0" exists
  56. And user "user1" exists
  57. And As an "user1"
  58. And user "user1" created a folder "/testshare"
  59. And as "user1" creating a share with
  60. | path | testshare |
  61. | shareType | 0 |
  62. | permissions | 1 |
  63. | shareWith | user0 |
  64. And user "user0" accepts last share
  65. And User "user1" copies file "/welcome.txt" to "/testshare/overwritethis.txt"
  66. And As an "user0"
  67. When User "user0" moves file "/textfile0.txt" to "/testshare/overwritethis.txt"
  68. Then the HTTP status code should be "403"
  69. And Downloaded content when downloading file "/testshare/overwritethis.txt" with range "bytes=0-6" should be "Welcome"
  70. Scenario: Copying a file
  71. Given using old dav path
  72. And As an "admin"
  73. And user "user0" exists
  74. And As an "user0"
  75. When User "user0" copies file "/welcome.txt" to "/FOLDER/welcome.txt"
  76. Then the HTTP status code should be "201"
  77. And Downloaded content when downloading file "/FOLDER/welcome.txt" with range "bytes=0-6" should be "Welcome"
  78. Scenario: Copying and overwriting a file
  79. Given using old dav path
  80. And As an "admin"
  81. And user "user0" exists
  82. And As an "user0"
  83. When User "user0" copies file "/welcome.txt" to "/textfile1.txt"
  84. Then the HTTP status code should be "204"
  85. And Downloaded content when downloading file "/textfile1.txt" with range "bytes=0-6" should be "Welcome"
  86. Scenario: Copying a file to a folder with no permissions
  87. Given using old dav path
  88. And As an "admin"
  89. And user "user0" exists
  90. And user "user1" exists
  91. And As an "user1"
  92. And user "user1" created a folder "/testshare"
  93. And as "user1" creating a share with
  94. | path | testshare |
  95. | shareType | 0 |
  96. | permissions | 1 |
  97. | shareWith | user0 |
  98. And user "user0" accepts last share
  99. And As an "user0"
  100. When User "user0" copies file "/textfile0.txt" to "/testshare/textfile0.txt"
  101. Then the HTTP status code should be "403"
  102. And Downloading file "/testshare/textfile0.txt"
  103. And the HTTP status code should be "404"
  104. Scenario: Copying a file to overwrite a file into a folder with no permissions
  105. Given using old dav path
  106. And As an "admin"
  107. And user "user0" exists
  108. And user "user1" exists
  109. And As an "user1"
  110. And user "user1" created a folder "/testshare"
  111. And as "user1" creating a share with
  112. | path | testshare |
  113. | shareType | 0 |
  114. | permissions | 1 |
  115. | shareWith | user0 |
  116. And user "user0" accepts last share
  117. And User "user1" copies file "/welcome.txt" to "/testshare/overwritethis.txt"
  118. And As an "user0"
  119. When User "user0" copies file "/textfile0.txt" to "/testshare/overwritethis.txt"
  120. Then the HTTP status code should be "403"
  121. And Downloaded content when downloading file "/testshare/overwritethis.txt" with range "bytes=0-6" should be "Welcome"
  122. Scenario: download a file with range
  123. Given using old dav path
  124. And As an "admin"
  125. When Downloading file "/welcome.txt" with range "bytes=52-78"
  126. Then Downloaded content should be "example file for developers"
  127. Scenario: Upload forbidden if quota is 0
  128. Given using old dav path
  129. And As an "admin"
  130. And user "user0" exists
  131. And user "user0" has a quota of "0"
  132. When User "user0" uploads file "data/textfile.txt" to "/asdf.txt"
  133. Then the HTTP status code should be "507"
  134. Scenario: Retrieving folder quota when no quota is set
  135. Given using old dav path
  136. And As an "admin"
  137. And user "user0" exists
  138. When user "user0" has unlimited quota
  139. Then as "user0" gets properties of folder "/" with
  140. |{DAV:}quota-available-bytes|
  141. And the single response should contain a property "{DAV:}quota-available-bytes" with value "-3"
  142. Scenario: Retrieving folder quota when quota is set
  143. Given using old dav path
  144. And As an "admin"
  145. And user "user0" exists
  146. When user "user0" has a quota of "10 MB"
  147. Then as "user0" gets properties of folder "/" with
  148. |{DAV:}quota-available-bytes|
  149. And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421"
  150. Scenario: Retrieving folder quota of shared folder with quota when no quota is set for recipient
  151. Given using old dav path
  152. And As an "admin"
  153. And user "user0" exists
  154. And user "user1" exists
  155. And user "user0" has unlimited quota
  156. And user "user1" has a quota of "10 MB"
  157. And As an "user1"
  158. And user "user1" created a folder "/testquota"
  159. And as "user1" creating a share with
  160. | path | testquota |
  161. | shareType | 0 |
  162. | permissions | 31 |
  163. | shareWith | user0 |
  164. And user "user0" accepts last share
  165. Then as "user0" gets properties of folder "/testquota" with
  166. |{DAV:}quota-available-bytes|
  167. And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421"
  168. Scenario: Uploading a file as recipient using webdav having quota
  169. Given using old dav path
  170. And As an "admin"
  171. And user "user0" exists
  172. And user "user1" exists
  173. And user "user0" has a quota of "10 MB"
  174. And user "user1" has a quota of "10 MB"
  175. And As an "user1"
  176. And user "user1" created a folder "/testquota"
  177. And as "user1" creating a share with
  178. | path | testquota |
  179. | shareType | 0 |
  180. | permissions | 31 |
  181. | shareWith | user0 |
  182. And user "user0" accepts last share
  183. And As an "user0"
  184. When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt"
  185. Then the HTTP status code should be "201"
  186. Scenario: Retrieving folder quota when quota is set and a file was uploaded
  187. Given using old dav path
  188. And As an "admin"
  189. And user "user0" exists
  190. And user "user0" has a quota of "1 KB"
  191. And user "user0" adds a file of 93 bytes to "/prueba.txt"
  192. When as "user0" gets properties of folder "/" with
  193. |{DAV:}quota-available-bytes|
  194. Then the single response should contain a property "{DAV:}quota-available-bytes" with value "592"
  195. Scenario: Retrieving folder quota when quota is set and a file was received
  196. Given using old dav path
  197. And As an "admin"
  198. And user "user0" exists
  199. And user "user1" exists
  200. And user "user1" has a quota of "1 KB"
  201. And user "user0" adds a file of 93 bytes to "/user0.txt"
  202. And file "user0.txt" of user "user0" is shared with user "user1"
  203. And user "user1" accepts last share
  204. When as "user1" gets properties of folder "/" with
  205. |{DAV:}quota-available-bytes|
  206. Then the single response should contain a property "{DAV:}quota-available-bytes" with value "685"
  207. Scenario: download a public shared file with range
  208. Given user "user0" exists
  209. And As an "user0"
  210. When creating a share with
  211. | path | welcome.txt |
  212. | shareType | 3 |
  213. And Downloading last public shared file with range "bytes=52-78"
  214. Then Downloaded content should be "example file for developers"
  215. Scenario: download a public shared file inside a folder with range
  216. Given user "user0" exists
  217. And As an "user0"
  218. When creating a share with
  219. | path | PARENT |
  220. | shareType | 3 |
  221. And Downloading last public shared file inside a folder "/parent.txt" with range "bytes=1-8"
  222. Then Downloaded content should be "extcloud"
  223. Scenario: Downloading a file on the old endpoint should serve security headers
  224. Given using old dav path
  225. And As an "admin"
  226. When Downloading file "/welcome.txt"
  227. Then The following headers should be set
  228. |Content-Disposition|attachment; filename*=UTF-8''welcome.txt; filename="welcome.txt"|
  229. |Content-Security-Policy|default-src 'none';|
  230. |X-Content-Type-Options |nosniff|
  231. |X-Download-Options|noopen|
  232. |X-Frame-Options|SAMEORIGIN|
  233. |X-Permitted-Cross-Domain-Policies|none|
  234. |X-Robots-Tag|none|
  235. |X-XSS-Protection|1; mode=block|
  236. And Downloaded content should start with "Welcome to your Nextcloud account!"
  237. Scenario: Doing a GET with a web login should work without CSRF token on the old backend
  238. Given Logging in using web as "admin"
  239. When Sending a "GET" to "/remote.php/webdav/welcome.txt" without requesttoken
  240. Then Downloaded content should start with "Welcome to your Nextcloud account!"
  241. Then the HTTP status code should be "200"
  242. Scenario: Doing a GET with a web login should work with CSRF token on the old backend
  243. Given Logging in using web as "admin"
  244. When Sending a "GET" to "/remote.php/webdav/welcome.txt" with requesttoken
  245. Then Downloaded content should start with "Welcome to your Nextcloud account!"
  246. Then the HTTP status code should be "200"
  247. Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the old backend
  248. Given Logging in using web as "admin"
  249. When Sending a "PROPFIND" to "/remote.php/webdav/welcome.txt" without requesttoken
  250. Then the HTTP status code should be "401"
  251. Scenario: Doing a PROPFIND with a web login should work with CSRF token on the old backend
  252. Given Logging in using web as "admin"
  253. When Sending a "PROPFIND" to "/remote.php/webdav/welcome.txt" with requesttoken
  254. Then the HTTP status code should be "207"
  255. Scenario: Upload chunked file asc
  256. Given user "user0" exists
  257. And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt"
  258. And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt"
  259. And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt"
  260. When As an "user0"
  261. And Downloading file "/myChunkedFile.txt"
  262. Then Downloaded content should be "AAAAABBBBBCCCCC"
  263. Scenario: Upload chunked file desc
  264. Given user "user0" exists
  265. And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt"
  266. And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt"
  267. And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt"
  268. When As an "user0"
  269. And Downloading file "/myChunkedFile.txt"
  270. Then Downloaded content should be "AAAAABBBBBCCCCC"
  271. Scenario: Upload chunked file random
  272. Given user "user0" exists
  273. And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt"
  274. And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt"
  275. And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt"
  276. When As an "user0"
  277. And Downloading file "/myChunkedFile.txt"
  278. Then Downloaded content should be "AAAAABBBBBCCCCC"
  279. Scenario: A file that is not shared does not have a share-types property
  280. Given user "user0" exists
  281. And user "user0" created a folder "/test"
  282. When as "user0" gets properties of folder "/test" with
  283. |{http://owncloud.org/ns}share-types|
  284. Then the response should contain an empty property "{http://owncloud.org/ns}share-types"
  285. Scenario: A file that is shared to a user has a share-types property
  286. Given user "user0" exists
  287. And user "user1" exists
  288. And user "user0" created a folder "/test"
  289. And as "user0" creating a share with
  290. | path | test |
  291. | shareType | 0 |
  292. | permissions | 31 |
  293. | shareWith | user1 |
  294. When as "user0" gets properties of folder "/test" with
  295. |{http://owncloud.org/ns}share-types|
  296. Then the response should contain a share-types property with
  297. | 0 |
  298. Scenario: A file that is shared to a group has a share-types property
  299. Given user "user0" exists
  300. And group "group1" exists
  301. And user "user0" created a folder "/test"
  302. And as "user0" creating a share with
  303. | path | test |
  304. | shareType | 1 |
  305. | permissions | 31 |
  306. | shareWith | group1 |
  307. When as "user0" gets properties of folder "/test" with
  308. |{http://owncloud.org/ns}share-types|
  309. Then the response should contain a share-types property with
  310. | 1 |
  311. Scenario: A file that is shared by link has a share-types property
  312. Given user "user0" exists
  313. And user "user0" created a folder "/test"
  314. And as "user0" creating a share with
  315. | path | test |
  316. | shareType | 3 |
  317. | permissions | 31 |
  318. When as "user0" gets properties of folder "/test" with
  319. |{http://owncloud.org/ns}share-types|
  320. Then the response should contain a share-types property with
  321. | 3 |
  322. Scenario: A file that is shared by user,group and link has a share-types property
  323. Given user "user0" exists
  324. And user "user1" exists
  325. And group "group2" exists
  326. And user "user0" created a folder "/test"
  327. And as "user0" creating a share with
  328. | path | test |
  329. | shareType | 0 |
  330. | permissions | 31 |
  331. | shareWith | user1 |
  332. And as "user0" creating a share with
  333. | path | test |
  334. | shareType | 1 |
  335. | permissions | 31 |
  336. | shareWith | group2 |
  337. And as "user0" creating a share with
  338. | path | test |
  339. | shareType | 3 |
  340. | permissions | 31 |
  341. When as "user0" gets properties of folder "/test" with
  342. |{http://owncloud.org/ns}share-types|
  343. Then the response should contain a share-types property with
  344. | 0 |
  345. | 1 |
  346. | 3 |
  347. Scenario: Upload chunked file asc with new chunking
  348. Given using new dav path
  349. And user "user0" exists
  350. And user "user0" creates a new chunking upload with id "chunking-42"
  351. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  352. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  353. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  354. And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt"
  355. When As an "user0"
  356. And Downloading file "/myChunkedFile.txt"
  357. Then Downloaded content should be "AAAAABBBBBCCCCC"
  358. Scenario: Upload chunked file desc with new chunking
  359. Given using new dav path
  360. And user "user0" exists
  361. And user "user0" creates a new chunking upload with id "chunking-42"
  362. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  363. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  364. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  365. And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt"
  366. When As an "user0"
  367. And Downloading file "/myChunkedFile.txt"
  368. Then Downloaded content should be "AAAAABBBBBCCCCC"
  369. Scenario: Upload chunked file random with new chunking
  370. Given using new dav path
  371. And user "user0" exists
  372. And user "user0" creates a new chunking upload with id "chunking-42"
  373. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  374. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  375. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  376. And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt"
  377. When As an "user0"
  378. And Downloading file "/myChunkedFile.txt"
  379. Then Downloaded content should be "AAAAABBBBBCCCCC"
  380. Scenario: A disabled user cannot use webdav
  381. Given user "userToBeDisabled" exists
  382. And As an "admin"
  383. And assure user "userToBeDisabled" is disabled
  384. When Downloading file "/welcome.txt" as "userToBeDisabled"
  385. Then the HTTP status code should be "503"
  386. Scenario: Copying files into a folder with edit permissions
  387. Given using dav path "remote.php/webdav"
  388. And user "user0" exists
  389. And user "user1" exists
  390. And As an "user1"
  391. And user "user1" created a folder "/testcopypermissionsAllowed"
  392. And as "user1" creating a share with
  393. | path | testcopypermissionsAllowed |
  394. | shareType | 0 |
  395. | permissions | 31 |
  396. | shareWith | user0 |
  397. And user "user0" accepts last share
  398. And User "user0" uploads file with content "copytest" to "/copytest.txt"
  399. When User "user0" copies file "/copytest.txt" to "/testcopypermissionsAllowed/copytest.txt"
  400. Then the HTTP status code should be "201"
  401. Scenario: Copying files into a folder without edit permissions
  402. Given using dav path "remote.php/webdav"
  403. And user "user0" exists
  404. And user "user1" exists
  405. And As an "user1"
  406. And user "user1" created a folder "/testcopypermissionsNotAllowed"
  407. And as "user1" creating a share with
  408. | path | testcopypermissionsNotAllowed |
  409. | shareType | 0 |
  410. | permissions | 1 |
  411. | shareWith | user0 |
  412. And user "user0" accepts last share
  413. And User "user0" uploads file with content "copytest" to "/copytest.txt"
  414. When User "user0" copies file "/copytest.txt" to "/testcopypermissionsNotAllowed/copytest.txt"
  415. Then the HTTP status code should be "403"
  416. Scenario: Uploading a file as recipient with limited permissions
  417. Given using new dav path
  418. And As an "admin"
  419. And user "user0" exists
  420. And user "user1" exists
  421. And user "user0" has a quota of "10 MB"
  422. And user "user1" has a quota of "10 MB"
  423. And As an "user1"
  424. And user "user1" created a folder "/testfolder"
  425. And as "user1" creating a share with
  426. | path | testfolder |
  427. | shareType | 0 |
  428. | permissions | 23 |
  429. | shareWith | user0 |
  430. And user "user0" accepts last share
  431. And As an "user0"
  432. And User "user0" uploads file "data/textfile.txt" to "/testfolder/asdf.txt"
  433. And As an "user1"
  434. When User "user1" deletes file "/testfolder/asdf.txt"
  435. Then the HTTP status code should be "204"
  436. Scenario: Creating a folder
  437. Given using old dav path
  438. And user "user0" exists
  439. And user "user0" created a folder "/test_folder"
  440. When as "user0" gets properties of folder "/test_folder" with
  441. |{DAV:}resourcetype|
  442. Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection"
  443. Scenario: Creating a folder with special chars
  444. Given using old dav path
  445. And user "user0" exists
  446. And user "user0" created a folder "/test_folder:5"
  447. When as "user0" gets properties of folder "/test_folder:5" with
  448. |{DAV:}resourcetype|
  449. Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection"
  450. Scenario: Removing everything of a folder
  451. Given using old dav path
  452. And As an "admin"
  453. And user "user0" exists
  454. And As an "user0"
  455. And User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt"
  456. And user "user0" created a folder "/FOLDER/SUBFOLDER"
  457. And User "user0" copies file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt"
  458. When User "user0" deletes everything from folder "/FOLDER/"
  459. Then user "user0" should see following elements
  460. | /FOLDER/ |
  461. | /PARENT/ |
  462. | /PARENT/parent.txt |
  463. | /textfile0.txt |
  464. | /textfile1.txt |
  465. | /textfile2.txt |
  466. | /textfile3.txt |
  467. | /textfile4.txt |
  468. Scenario: Removing everything of a folder using new dav path
  469. Given using new dav path
  470. And As an "admin"
  471. And user "user0" exists
  472. And As an "user0"
  473. And User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt"
  474. And user "user0" created a folder "/FOLDER/SUBFOLDER"
  475. And User "user0" copies file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt"
  476. When User "user0" deletes everything from folder "/FOLDER/"
  477. Then user "user0" should see following elements
  478. | /FOLDER/ |
  479. | /PARENT/ |
  480. | /PARENT/parent.txt |
  481. | /textfile0.txt |
  482. | /textfile1.txt |
  483. | /textfile2.txt |
  484. | /textfile3.txt |
  485. | /textfile4.txt |
  486. Scenario: Checking file id after a move using new endpoint
  487. Given using new dav path
  488. And user "user0" exists
  489. And User "user0" stores id of file "/textfile0.txt"
  490. When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt"
  491. Then User "user0" checks id of file "/FOLDER/textfile0.txt"
  492. Scenario: Checking file id after a move overwrite using new chunking endpoint
  493. Given using new dav path
  494. And user "user0" exists
  495. And User "user0" copies file "/textfile0.txt" to "/existingFile.txt"
  496. And User "user0" stores id of file "/existingFile.txt"
  497. And user "user0" creates a new chunking upload with id "chunking-42"
  498. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  499. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  500. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  501. When user "user0" moves new chunk file with id "chunking-42" to "/existingFile.txt"
  502. Then User "user0" checks id of file "/existingFile.txt"
  503. Scenario: Renaming a folder to a backslash encoded should return an error using old endpoint
  504. Given using old dav path
  505. And user "user0" exists
  506. And user "user0" created a folder "/testshare"
  507. When User "user0" moves folder "/testshare" to "/%5C"
  508. Then the HTTP status code should be "400"
  509. Scenario: Renaming a folder beginning with a backslash encoded should return an error using old endpoint
  510. Given using old dav path
  511. And user "user0" exists
  512. And user "user0" created a folder "/testshare"
  513. When User "user0" moves folder "/testshare" to "/%5Ctestshare"
  514. Then the HTTP status code should be "400"
  515. Scenario: Renaming a folder including a backslash encoded should return an error using old endpoint
  516. Given using old dav path
  517. And user "user0" exists
  518. And user "user0" created a folder "/testshare"
  519. When User "user0" moves folder "/testshare" to "/hola%5Chola"
  520. Then the HTTP status code should be "400"
  521. Scenario: Renaming a folder to a backslash encoded should return an error using new endpoint
  522. Given using new dav path
  523. And user "user0" exists
  524. And user "user0" created a folder "/testshare"
  525. When User "user0" moves folder "/testshare" to "/%5C"
  526. Then the HTTP status code should be "400"
  527. Scenario: Renaming a folder beginning with a backslash encoded should return an error using new endpoint
  528. Given using new dav path
  529. And user "user0" exists
  530. And user "user0" created a folder "/testshare"
  531. When User "user0" moves folder "/testshare" to "/%5Ctestshare"
  532. Then the HTTP status code should be "400"
  533. Scenario: Renaming a folder including a backslash encoded should return an error using new endpoint
  534. Given using new dav path
  535. And user "user0" exists
  536. And user "user0" created a folder "/testshare"
  537. When User "user0" moves folder "/testshare" to "/hola%5Chola"
  538. Then the HTTP status code should be "400"
  539. Scenario: Upload file via new chunking endpoint with wrong size header
  540. Given using new dav path
  541. And user "user0" exists
  542. And user "user0" creates a new chunking upload with id "chunking-42"
  543. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  544. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  545. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  546. When user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" with size 5
  547. Then the HTTP status code should be "400"
  548. Scenario: Upload file via new chunking endpoint with correct size header
  549. Given using new dav path
  550. And user "user0" exists
  551. And user "user0" creates a new chunking upload with id "chunking-42"
  552. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  553. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  554. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  555. When user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" with size 15
  556. Then the HTTP status code should be "201"