Skip to content

Commit

Permalink
Merge pull request #10697 from owncloud/tests/zero-byte-upload
Browse files Browse the repository at this point in the history
[tests-only][full-ci] Add tests for zero-byte file upload on public share
  • Loading branch information
saw-jan authored Jan 2, 2025
2 parents 971e0fd + 0a7977c commit d32d3f1
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/acceptance/expected-failures-without-remotephp.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@
- [apiSpaces/publicLink.feature:28](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/publicLink.feature#L28)
- [apiSpaces/publicLink.feature:34](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/publicLink.feature#L34)
- [apiSpaces/publicLink.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/publicLink.feature#L40)
- [apiSpaces/uploadSpaces.feature:98](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L98)
- [apiSpaces/uploadSpaces.feature:115](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L115)
- [apiSpaces/uploadSpaces.feature:132](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L132)
- [apiSpacesShares/shareSpacesViaLink.feature:61](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature#L61)
- [apiDepthInfinity/propfind.feature:74](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiDepthInfinity/propfind.feature#L74)
- [apiDepthInfinity/propfind.feature:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiDepthInfinity/propfind.feature#L124)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2763,4 +2763,4 @@ Feature: Create a link share for a resource
| permissions-role |
| Space Viewer |
| Space Editor |
| Manager |
| Manager |
49 changes: 49 additions & 0 deletions tests/acceptance/features/apiSpaces/uploadSpaces.feature
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,52 @@ Feature: Upload files into a space
| folder-name |
| foo/bar |
| foo/bar/baz |

@issue-10331 @issue-10469
Scenario: public uploads a zero byte file to a public share folder
Given using SharingNG
And user "Alice" has created folder "/uploadFolder"
And user "Alice" has created the following resource link share:
| resource | uploadFolder |
| space | Personal |
| permissionsRole | createOnly |
| password | %public% |
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" folder "uploadFolder" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files:
| textfile (1).txt |
| textfile (2).txt |

@issue-10331 @issue-10469
Scenario: public uploads a zero byte file to a public share folder inside project space
Given using SharingNG
And user "Alice" has created a folder "/uploadFolder" in space "Project Ceres"
And user "Alice" has created the following resource link share:
| resource | uploadFolder |
| space | Project Ceres |
| permissionsRole | createOnly |
| password | %public% |
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" folder "uploadFolder" of the space "Project Ceres" should contain these files:
| textfile.txt |
And for user "Alice" folder "uploadFolder" of the space "Project Ceres" should not contain these files:
| textfile (1).txt |
| textfile (2).txt |

@issue-10331 @issue-10469
Scenario: public uploads a zero byte file to a public share project space
Given using SharingNG
And user "Alice" has created the following space link share:
| space | Project Ceres |
| permissionsRole | createOnly |
| password | %public% |
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project Ceres" should contain these files:
| textfile.txt |
And for user "Alice" the space "Project Ceres" should not contain these files:
| textfile (1).txt |
| textfile (2).txt |

0 comments on commit d32d3f1

Please sign in to comment.