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 tests for zero-byte file upload on public share #10697

Merged
merged 5 commits into from
Jan 2, 2025
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
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 |
nabim777 marked this conversation as resolved.
Show resolved Hide resolved
| 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 |