Skip to content

Commit

Permalink
Merge pull request #39703 from owncloud/issue-39702
Browse files Browse the repository at this point in the history
[full-ci] Acceptance tests for deep moves and fix 39702
  • Loading branch information
phil-davis authored Jan 21, 2022
2 parents b9a446c + d074df1 commit 65b2cfc
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 6 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/39703
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Moving a file from one folder into a folder that is a number fails

The issue is fixed by updating sabre/dav from 4.3.0 to 4.3.1

https://github.com/owncloud/core/issues/39702
https://github.com/owncloud/core/pull/39703
3 changes: 2 additions & 1 deletion changelog/unreleased/PHPdependencies20211123onward
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ The following have been updated:
- league/mime-type-detection (1.8.0 to 1.9.0)
- paragonie/constant_time_encoding (2.4.0 to 2.5.0)
- phpseclib/phpseclib (3.0.11 => 3.0.12)
- sabre/dav (4.2.0 to 4.3.0)
- sabre/dav (4.2.0 to 4.3.1)
- sabre/vobject (4.4.0 to 4.4.1)

https://github.com/owncloud/core/pull/39526
https://github.com/owncloud/core/pull/39631
https://github.com/owncloud/core/pull/39649
https://github.com/owncloud/core/pull/39693
https://github.com/owncloud/core/pull/39695
https://github.com/owncloud/core/pull/39703
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions tests/acceptance/features/apiWebdavMove2/moveFile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,56 @@ Feature: move (rename) file
| dav_version |
| old |
| new |

Scenario Outline: Moving a file (deep moves with various folder and file names)
Given using <dav_version> DAV path
And user "Alice" has created folder "<source_folder>"
And user "Alice" has created folder "<target_folder>"
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/<source_folder>/<source_file>"
When user "Alice" moves file "/<source_folder>/<source_file>" to "/<target_folder>/<target_file>" using the WebDAV API
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 the content of file "/<target_folder>/<target_file>" for user "Alice" should be "ownCloud test text file 0"
Examples:
| dav_version | source_folder | source_file | target_folder | target_file |
| old | text | file.txt | 0 | file.txt |
| old | text | file.txt | 1 | file.txt |
| old | 0 | file.txt | text | file.txt |
| old | 1 | file.txt | text | file.txt |
| old | texta | 0 | textb | file.txt |
| old | texta | 1 | textb | file.txt |
| old | texta | file.txt | textb | 0 |
| old | texta | file.txt | textb | 1 |
| new | text | file.txt | 0 | file.txt |
| new | text | file.txt | 1 | file.txt |
| new | 0 | file.txt | text | file.txt |
| new | 1 | file.txt | text | file.txt |
| new | texta | 0 | textb | file.txt |
| new | texta | 1 | textb | file.txt |
| new | texta | file.txt | textb | 0 |
| new | texta | file.txt | textb | 1 |

Scenario Outline: Moving a file from a folder to the root
Given using <dav_version> DAV path
And user "Alice" has created folder "<source_folder>"
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/<source_folder>/<source_file>"
When user "Alice" moves file "/<source_folder>/<source_file>" to "/<target_file>" using the WebDAV API
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 the content of file "/<target_file>" for user "Alice" should be "ownCloud test text file 0"
Examples:
| dav_version | source_folder | source_file | target_file |
| old | 0 | file.txt | file.txt |
| old | 1 | file.txt | file.txt |
| old | texta | 0 | file.txt |
| old | texta | 1 | file.txt |
| old | texta | file.txt | 0 |
| old | texta | file.txt | 1 |
| new | 0 | file.txt | file.txt |
| new | 1 | file.txt | file.txt |
| new | texta | 0 | file.txt |
| new | texta | 1 | file.txt |
| new | texta | file.txt | 0 |
| new | texta | file.txt | 1 |

0 comments on commit 65b2cfc

Please sign in to comment.