2023-08-16 09:29:00 +05:45
@issue-1343
2023-01-02 17:26:54 +05:45
Feature: upload file using old chunking
As a user
I want to be able to upload "large" files in chunks
So that the upload can be completed in less elapsed time
Background:
Given using OCS API version " 1 "
2024-11-29 09:39:21 +05:45
And user " Alice " has been created with default attributes
2023-01-02 17:26:54 +05:45
2023-02-01 12:18:19 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: upload chunked file in ascending order
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user " Alice " uploads the following " 3 " chunks to " /myChunkedFile.txt " with old chunking and using the WebDAV API
| number | content |
| 1 | AAAAA |
| 2 | BBBBB |
| 3 | CCCCC |
Then the HTTP status code should be " 201 "
And the following headers should match these regular expressions for user " Alice "
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
And as " Alice " file " /myChunkedFile.txt " should exist
And the content of file " /myChunkedFile.txt " for user " Alice " should be " AAAAABBBBBCCCCC "
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
2024-11-07 14:12:16 +05:45
| new |
2023-07-12 12:42:32 +05:45
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: upload chunked file in descending order
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user " Alice " uploads the following " 3 " chunks to " /myChunkedFile.txt " with old chunking and using the WebDAV API
| number | content |
| 3 | CCCCC |
| 2 | BBBBB |
| 1 | AAAAA |
Then the HTTP status code should be " 201 "
And as " Alice " file " /myChunkedFile.txt " should exist
And the content of file " /myChunkedFile.txt " for user " Alice " should be " AAAAABBBBBCCCCC "
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
2024-11-07 14:12:16 +05:45
| new |
2023-07-12 12:42:32 +05:45
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: upload chunked file in random order
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user " Alice " uploads the following " 3 " chunks to " /myChunkedFile.txt " with old chunking and using the WebDAV API
| number | content |
| 2 | BBBBB |
| 3 | CCCCC |
| 1 | AAAAA |
Then the HTTP status code should be " 201 "
And as " Alice " file " /myChunkedFile.txt " should exist
And the content of file " /myChunkedFile.txt " for user " Alice " should be " AAAAABBBBBCCCCC "
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
2024-11-07 14:12:16 +05:45
| new |
2023-07-12 12:42:32 +05:45
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: checking file id after a move overwrite using old chunking endpoint
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " textfile0.txt "
And user " Alice " has copied file " /textfile0.txt " to " /existingFile.txt "
And user " Alice " has stored id of file " /existingFile.txt "
2024-11-07 14:12:16 +05:45
When user " Alice " uploads file " filesForUpload/textfile.txt " to " /existingFile.txt " in 3 chunks using the WebDAV API
2023-01-02 17:26:54 +05:45
Then the HTTP status code should be " 201 "
And user " Alice " file " /existingFile.txt " should have the previously stored id
And the content of file " /existingFile.txt " for user " Alice " should be:
"""
This is a testfile.
Cheers.
"""
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
2024-11-07 14:12:16 +05:45
| new |
2023-07-12 12:42:32 +05:45
| spaces |
2023-01-02 17:26:54 +05:45
@smokeTest
# This smokeTest scenario does ordinary checks for chunked upload,
# without adjusting the log level. This allows it to run in test environments
# where the log level has been fixed and cannot be changed.
2023-06-05 17:18:44 +05:45
Scenario Outline: chunked upload files with difficult name
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user " Alice " uploads file " filesForUpload/textfile.txt " to " / <file-name> " in 3 chunks using the WebDAV API
Then the HTTP status code should be " 201 "
And as " Alice " file " / <file-name> " should exist
And the content of file " / <file-name> " for user " Alice " should be:
"""
This is a testfile.
Cheers.
"""
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version | file-name |
| old | & #? TIÄFÜ @a#8a=b?c=d ?abc=oc # |
| old | 0 |
2024-11-07 14:12:16 +05:45
| new | & #? TIÄFÜ @a#8a=b?c=d ?abc=oc # |
| new | 0 |
2023-07-12 12:42:32 +05:45
| spaces | & #? TIÄFÜ @a#8a=b?c=d ?abc=oc # |
| spaces | 0 |
2023-01-02 17:26:54 +05:45
2023-02-01 12:18:19 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: upload chunked file with old chunking with lengthy filenames
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user " Alice " uploads the following chunks to " नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-12345678910.txt " with old chunking and using the WebDAV API
| number | content |
| 1 | AAAAAAAAAAAAAAAAAAAAAAAAA |
| 2 | BBBBBBBBBBBBBBBBBBBBBBBBB |
| 3 | CCCCCCCCCCCCCCCCCCCCCCCCC |
Then the HTTP status code should be " 201 "
And the following headers should match these regular expressions for user " Alice "
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
And as " Alice " file " नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-12345678910.txt " should exist
And the content of file " नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-नेपालि-file-नाम-12345678910.txt " for user " Alice " should be " AAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCC "
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
2024-11-07 14:12:16 +05:45
| new |
2023-07-12 12:42:32 +05:45
| spaces |