Skip to content

Commit d32d3f1

Browse files
authored
Merge pull request #10697 from owncloud/tests/zero-byte-upload
[tests-only][full-ci] Add tests for zero-byte file upload on public share
2 parents 971e0fd + 0a7977c commit d32d3f1

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

tests/acceptance/expected-failures-without-remotephp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195
- [apiSpaces/publicLink.feature:28](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/publicLink.feature#L28)
196196
- [apiSpaces/publicLink.feature:34](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/publicLink.feature#L34)
197197
- [apiSpaces/publicLink.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/publicLink.feature#L40)
198+
- [apiSpaces/uploadSpaces.feature:98](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L98)
199+
- [apiSpaces/uploadSpaces.feature:115](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L115)
200+
- [apiSpaces/uploadSpaces.feature:132](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L132)
198201
- [apiSpacesShares/shareSpacesViaLink.feature:61](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature#L61)
199202
- [apiDepthInfinity/propfind.feature:74](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiDepthInfinity/propfind.feature#L74)
200203
- [apiDepthInfinity/propfind.feature:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiDepthInfinity/propfind.feature#L124)

tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2763,4 +2763,4 @@ Feature: Create a link share for a resource
27632763
| permissions-role |
27642764
| Space Viewer |
27652765
| Space Editor |
2766-
| Manager |
2766+
| Manager |

tests/acceptance/features/apiSpaces/uploadSpaces.feature

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,52 @@ Feature: Upload files into a space
9393
| folder-name |
9494
| foo/bar |
9595
| foo/bar/baz |
96+
97+
@issue-10331 @issue-10469
98+
Scenario: public uploads a zero byte file to a public share folder
99+
Given using SharingNG
100+
And user "Alice" has created folder "/uploadFolder"
101+
And user "Alice" has created the following resource link share:
102+
| resource | uploadFolder |
103+
| space | Personal |
104+
| permissionsRole | createOnly |
105+
| password | %public% |
106+
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API
107+
Then the HTTP status code should be "201"
108+
And for user "Alice" folder "uploadFolder" of the space "Personal" should contain these files:
109+
| textfile.txt |
110+
And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files:
111+
| textfile (1).txt |
112+
| textfile (2).txt |
113+
114+
@issue-10331 @issue-10469
115+
Scenario: public uploads a zero byte file to a public share folder inside project space
116+
Given using SharingNG
117+
And user "Alice" has created a folder "/uploadFolder" in space "Project Ceres"
118+
And user "Alice" has created the following resource link share:
119+
| resource | uploadFolder |
120+
| space | Project Ceres |
121+
| permissionsRole | createOnly |
122+
| password | %public% |
123+
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API
124+
Then the HTTP status code should be "201"
125+
And for user "Alice" folder "uploadFolder" of the space "Project Ceres" should contain these files:
126+
| textfile.txt |
127+
And for user "Alice" folder "uploadFolder" of the space "Project Ceres" should not contain these files:
128+
| textfile (1).txt |
129+
| textfile (2).txt |
130+
131+
@issue-10331 @issue-10469
132+
Scenario: public uploads a zero byte file to a public share project space
133+
Given using SharingNG
134+
And user "Alice" has created the following space link share:
135+
| space | Project Ceres |
136+
| permissionsRole | createOnly |
137+
| password | %public% |
138+
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API
139+
Then the HTTP status code should be "201"
140+
And for user "Alice" the space "Project Ceres" should contain these files:
141+
| textfile.txt |
142+
And for user "Alice" the space "Project Ceres" should not contain these files:
143+
| textfile (1).txt |
144+
| textfile (2).txt |

0 commit comments

Comments
 (0)