Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only][full-ci]Add then step to apiWebdavUploadTUS suite #39812

Merged
merged 1 commit into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions tests/acceptance/features/apiWebdavUploadTUS/checksums.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Feature: checksums
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
When user "Alice" uploads file with checksum "MD5 827ccb0eea8a706c4c34a16891f84e7b" to the last created TUS Location with offset "0" and content "12345" using the TUS protocol on the WebDAV API
And user "Alice" requests the checksum of "/textFile.txt" via propfind
Then the webdav checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964 MD5:827ccb0eea8a706c4c34a16891f84e7b ADLER32:02f80100"
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964 MD5:827ccb0eea8a706c4c34a16891f84e7b ADLER32:02f80100"
Examples:
| dav_version |
| old |
Expand All @@ -55,7 +56,8 @@ Feature: checksums
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
And user "Alice" has uploaded file with checksum "MD5 827ccb0eea8a706c4c34a16891f84e7b" to the last created TUS Location with offset "0" and content "12345" using the TUS protocol on the WebDAV API
When user "Alice" downloads file "/textFile.txt" using the WebDAV API
Then the header checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964"
Then the HTTP status code should be "200"
And the header checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964"
Examples:
| dav_version |
| old |
Expand Down Expand Up @@ -120,7 +122,8 @@ Feature: checksums
And user "Alice" has uploaded a chunk to the last created TUS Location with offset "0" and data "01234" with checksum "MD5 4100c4d44da9177247e44a5fc1546778" using the TUS protocol on the WebDAV API
And user "Alice" has uploaded a chunk to the last created TUS Location with offset "5" and data "56789" with checksum "MD5 099ebea48ea9666a7da2177267983138" using the TUS protocol on the WebDAV API
When user "Alice" requests the checksum of "/textFile.txt" via propfind
Then the webdav checksum should match "SHA1:87acec17cd9dcd20a716cc2cf67417b71c8a7016 MD5:781e5e245d69b566979b86e28d23f2c7 ADLER32:0aff020e"
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:87acec17cd9dcd20a716cc2cf67417b71c8a7016 MD5:781e5e245d69b566979b86e28d23f2c7 ADLER32:0aff020e"
Examples:
| dav_version |
| old |
Expand All @@ -141,7 +144,8 @@ Feature: checksums
And user "Alice" has uploaded a chunk to the last created TUS Location with offset "0" and data "01234" with checksum "MD5 4100c4d44da9177247e44a5fc1546778" using the TUS protocol on the WebDAV API
And user "Alice" has uploaded a chunk to the last created TUS Location with offset "5" and data "56789" with checksum "MD5 099ebea48ea9666a7da2177267983138" using the TUS protocol on the WebDAV API
When user "Alice" downloads file "/textFile.txt" using the WebDAV API
Then the header checksum should match "SHA1:87acec17cd9dcd20a716cc2cf67417b71c8a7016"
Then the HTTP status code should be "200"
And the header checksum should match "SHA1:87acec17cd9dcd20a716cc2cf67417b71c8a7016"
Examples:
| dav_version |
| old |
Expand Down Expand Up @@ -186,7 +190,8 @@ Feature: checksums
| Upload-Length | 5 |
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
And user "Alice" requests the checksum of "/textFile.txt" via propfind
Then the webdav checksum should match "SHA1:aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d MD5:5d41402abc4b2a76b9719d911017c592 ADLER32:062c0215"
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d MD5:5d41402abc4b2a76b9719d911017c592 ADLER32:062c0215"
And the content of file "/textFile.txt" for user "Alice" should be "hello"
Examples:
| dav_version | overwriteChecksum |
Expand Down Expand Up @@ -240,7 +245,8 @@ Feature: checksums
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
And user "Alice" requests the checksum of "/textFile.txt" via propfind
Then the webdav checksum should match "SHA1:aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d MD5:5d41402abc4b2a76b9719d911017c592 ADLER32:062c0215"
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d MD5:5d41402abc4b2a76b9719d911017c592 ADLER32:062c0215"
And the content of file "/textFile.txt" for user "Alice" should be "hello"
Examples:
| dav_version | overwriteChecksum |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Feature: tests of the creation extension see https://tus.io/protocols/resumable-
Scenario Outline: creating a new resource and upload data in multiple bytes using creation with upload extension
Given using <dav_version> DAV path
When user "Alice" creates file "textFile.txt" and uploads content "12345" in the same request using the TUS protocol on the WebDAV API
Then the content of file "/textFile.txt" for user "Alice" should be "12345"
Then the HTTP status code should be "200"
And the content of file "/textFile.txt" for user "Alice" should be "12345"
Examples:
| dav_version |
| old |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Feature: OPTIONS request
| endpoint |
| /remote.php/webdav/ |
| /remote.php/dav/files/%username%/ |
Then the following headers should be set
Then the HTTP status code should be "204"
And the following headers should be set
| header | value |
| Tus-Resumable | 1.0.0 |
| Tus-Version | 1.0.0 |
Expand All @@ -21,7 +22,8 @@ Feature: OPTIONS request
When user "Alice" requests these endpoints with "OPTIONS" including body "doesnotmatter" using the password of user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/ |
Then the following headers should be set
Then the HTTP status code should be "204"
And the following headers should be set
| header | value |
| Tus-Resumable | 1.0.0 |
| Tus-Version | 1.0.0 |
Expand All @@ -33,7 +35,8 @@ Feature: OPTIONS request
| endpoint |
| /remote.php/webdav/ |
| /remote.php/dav/files/%username%/ |
Then the following headers should be set
Then the HTTP status code should be "204"
And the following headers should be set
| header | value |
| Tus-Resumable | 1.0.0 |
| Tus-Version | 1.0.0 |
Expand All @@ -45,7 +48,8 @@ Feature: OPTIONS request
When a user requests these endpoints with "OPTIONS" with body "doesnotmatter" and no authentication about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/ |
Then the following headers should be set
Then the HTTP status code should be "204"
And the following headers should be set
| header | value |
| Tus-Resumable | 1.0.0 |
| Tus-Version | 1.0.0 |
Expand All @@ -57,7 +61,8 @@ Feature: OPTIONS request
| endpoint |
| /remote.php/webdav/ |
| /remote.php/dav/files/%username%/ |
Then the following headers should be set
Then the HTTP status code should be "401"
And the following headers should be set
| header | value |
| Tus-Resumable | 1.0.0 |
| Tus-Version | 1.0.0 |
Expand All @@ -69,7 +74,8 @@ Feature: OPTIONS request
When user "Alice" requests these endpoints with "OPTIONS" including body "doesnotmatter" using password "invalid" about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/ |
Then the following headers should be set
Then the HTTP status code should be "401"
And the following headers should be set
| header | value |
| Tus-Resumable | 1.0.0 |
| Tus-Version | 1.0.0 |
Expand All @@ -82,7 +88,8 @@ Feature: OPTIONS request
| endpoint |
| /remote.php/webdav/ |
| /remote.php/dav/files/%username%/ |
Then the following headers should be set
Then the HTTP status code should be "401"
And the following headers should be set
| header | value |
| Tus-Resumable | 1.0.0 |
| Tus-Version | 1.0.0 |
Expand All @@ -95,7 +102,8 @@ Feature: OPTIONS request
When user "Brian" requests these endpoints with "OPTIONS" including body "doesnotmatter" using the password of user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/ |
Then the following headers should be set
Then the HTTP status code should be "401"
And the following headers should be set
| header | value |
| Tus-Resumable | 1.0.0 |
| Tus-Version | 1.0.0 |
Expand Down
27 changes: 18 additions & 9 deletions tests/acceptance/features/apiWebdavUploadTUS/uploadFile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Feature: upload file
Scenario Outline: upload a file and check download content
Given using <dav_version> DAV path
When user "Alice" uploads file with content "uploaded content" to "<file_name>" using the TUS protocol on the WebDAV API
Then the content of file "<file_name>" for user "Alice" should be "uploaded content"
Then the HTTP status code should be "200"
And the content of file "<file_name>" for user "Alice" should be "uploaded content"
Examples:
| dav_version | file_name |
| old | /upload.txt |
Expand Down Expand Up @@ -44,7 +45,8 @@ Feature: upload file
Given using <dav_version> DAV path
And user "Alice" has created folder "<folder_name>"
When user "Alice" uploads file with content "uploaded content" to "<folder_name>/<file_name>" using the TUS protocol on the WebDAV API
Then the content of file "<folder_name>/<file_name>" for user "Alice" should be "uploaded content"
Then the HTTP status code should be "201"
And the content of file "<folder_name>/<file_name>" for user "Alice" should be "uploaded content"
Examples:
| dav_version | folder_name | file_name |
| old | /upload | abc.txt |
Expand Down Expand Up @@ -76,7 +78,8 @@ Feature: upload file
Scenario Outline: Upload chunked file with TUS
Given using <dav_version> DAV path
When user "Alice" uploads file with content "uploaded content" in 3 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
Then the content of file "/myChunkedFile.txt" for user "Alice" should be "uploaded content"
Then the HTTP status code should be "200"
And the content of file "/myChunkedFile.txt" for user "Alice" should be "uploaded content"
Examples:
| dav_version |
| old |
Expand All @@ -91,7 +94,8 @@ Feature: upload file
Scenario Outline: Upload 1 byte chunks with TUS
Given using <dav_version> DAV path
When user "Alice" uploads file with content "0123456789" in 10 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
Then the content of file "/myChunkedFile.txt" for user "Alice" should be "0123456789"
Then the HTTP status code should be "200"
And the content of file "/myChunkedFile.txt" for user "Alice" should be "0123456789"
Examples:
| dav_version |
| old |
Expand All @@ -107,7 +111,8 @@ Feature: upload file
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "original content" to "textfile.txt"
When user "Alice" uploads file with content "overwritten content" to "textfile.txt" using the TUS protocol on the WebDAV API
Then the content of file "textfile.txt" for user "Alice" should be "overwritten content"
Then the HTTP status code should be "201"
And the content of file "textfile.txt" for user "Alice" should be "overwritten content"
Examples:
| dav_version |
| old |
Expand All @@ -122,7 +127,8 @@ Feature: upload file
Scenario Outline: upload a file and no version is available
Given using <dav_version> DAV path
When user "Alice" uploads file with content "uploaded content" to "/upload.txt" using the TUS protocol on the WebDAV API
Then the version folder of file "/upload.txt" for user "Alice" should contain "0" elements
Then the HTTP status code should be "200"
And the version folder of file "/upload.txt" for user "Alice" should contain "0" elements
Examples:
| dav_version |
| old |
Expand All @@ -138,7 +144,8 @@ Feature: upload file
Given using <dav_version> DAV path
When user "Alice" uploads file with content "uploaded content" to "/upload.txt" using the TUS protocol on the WebDAV API
And user "Alice" uploads file with content "re-uploaded content" to "/upload.txt" using the TUS protocol on the WebDAV API
Then the version folder of file "/upload.txt" for user "Alice" should contain "1" element
Then the HTTP status code should be "200"
And the version folder of file "/upload.txt" for user "Alice" should contain "1" element
And the content of file "/upload.txt" for user "Alice" should be "re-uploaded content"
Examples:
| dav_version |
Expand All @@ -154,7 +161,8 @@ Feature: upload file
Scenario Outline: upload a file in chunks with TUS and no version is available
Given using <dav_version> DAV path
When user "Alice" uploads file with content "0123456789" in 10 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
Then the version folder of file "/myChunkedFile.txt" for user "Alice" should contain "0" elements
Then the HTTP status code should be "200"
And the version folder of file "/myChunkedFile.txt" for user "Alice" should contain "0" elements
Examples:
| dav_version |
| old |
Expand All @@ -165,7 +173,8 @@ Feature: upload file
Given using <dav_version> DAV path
When user "Alice" uploads file with content "0123456789" in 10 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
And user "Alice" uploads file with content "01234" in 5 chunks to "/myChunkedFile.txt" using the TUS protocol on the WebDAV API
Then the version folder of file "/myChunkedFile.txt" for user "Alice" should contain "1" elements
Then the HTTP status code should be "200"
And the version folder of file "/myChunkedFile.txt" for user "Alice" should contain "1" elements
And the content of file "/myChunkedFile.txt" for user "Alice" should be "01234"
Examples:
| dav_version |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Feature: upload file
Scenario Outline: upload file with mtime
Given using <dav_version> DAV path
When user "Alice" uploads file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the TUS protocol on the WebDAV API
Then as "Alice" the mtime of the file "file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"
Then the HTTP status code should be "200"
And as "Alice" the mtime of the file "file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"
Examples:
| dav_version |
| old |
Expand All @@ -25,7 +26,8 @@ Feature: upload file
Scenario Outline: upload file with future mtime
Given using <dav_version> DAV path
When user "Alice" uploads file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2129 04:18:13 GMT" using the TUS protocol on the WebDAV API
Then as "Alice" the mtime of the file "file.txt" should be "Thu, 08 Aug 2129 04:18:13 GMT"
Then the HTTP status code should be "200"
And as "Alice" the mtime of the file "file.txt" should be "Thu, 08 Aug 2129 04:18:13 GMT"
Examples:
| dav_version |
| old |
Expand All @@ -41,7 +43,8 @@ Feature: upload file
Given using <dav_version> DAV path
And user "Alice" has created folder "testFolder"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/testFolder/file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the TUS protocol on the WebDAV API
Then as "Alice" the mtime of the file "/testFolder/file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"
Then the HTTP status code should be "201"
And as "Alice" the mtime of the file "/testFolder/file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"
Examples:
| dav_version |
| old |
Expand All @@ -57,7 +60,8 @@ Feature: upload file
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "first time upload content" to "file.txt"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the TUS protocol on the WebDAV API
Then as "Alice" the mtime of the file "file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"
Then the HTTP status code should be "201"
And as "Alice" the mtime of the file "file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"
Examples:
| dav_version |
| old |
Expand Down
Loading