Skip to content

Commit

Permalink
Refactored personalSpace tagged scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed May 23, 2023
1 parent 4080b85 commit 54a1fa0
Show file tree
Hide file tree
Showing 59 changed files with 399 additions and 762 deletions.
15 changes: 7 additions & 8 deletions tests/acceptance/features/coreApiAuth/webDavAuth.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ Feature: auth
Given user "Alice" has been created with default attributes and without skeleton files

@smokeTest
Scenario: using WebDAV anonymously
When a user requests "/remote.php/webdav" with "PROPFIND" and no authentication
Then the HTTP status code should be "401"

@smokeTest @personalSpace
Scenario: using spaces WebDAV anonymously
When user "Alice" requests "/dav/spaces/%spaceid%" with "PROPFIND" and no authentication
Scenario Outline: using WebDAV anonymously
When a user requests "<dav_path>" with "PROPFIND" and no authentication
Then the HTTP status code should be "401"
Examples:
| dav_path |
| /remote.php/webdav |
| /dav/spaces/%spaceid% |

@smokeTest
Scenario Outline: using WebDAV with basic auth
Expand All @@ -25,7 +24,7 @@ Feature: auth
| dav_path |
| /remote.php/webdav |

@personalSpace
@skipOnRevaMaster
Examples:
| dav_path |
| /dav/spaces/%spaceid% |
36 changes: 3 additions & 33 deletions tests/acceptance/features/coreApiAuthWebDav/webDavCOPYAuth.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ Feature: COPY file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send COPY requests to webDav endpoints as normal user with wrong password using the spaces WebDAV API
When user "Alice" requests these endpoints with "COPY" using password "invalid" about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -43,12 +37,6 @@ Feature: COPY file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send COPY requests to webDav endpoints as normal user with no password using the spaces WebDAV API
When user "Alice" requests these endpoints with "COPY" using password "" about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -63,7 +51,7 @@ Feature: COPY file/folder
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "403"

@personalSpace
@skipOnRevaMaster
Scenario: send COPY requests to another user's webDav endpoints as normal user using the spaces WebDAV API
When user "Brian" requests these endpoints with "COPY" about user "Alice"
| endpoint |
Expand All @@ -81,12 +69,6 @@ Feature: COPY file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@personalSpace
Scenario: send COPY requests to webDav endpoints using invalid username but correct password using the spaces WebDAV API
When user "usero" requests these endpoints with "COPY" using the password of user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -101,12 +83,6 @@ Feature: COPY file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@personalSpace
Scenario: send COPY requests to webDav endpoints using valid password and username of different user using the spaces WebDAV API
When user "Brian" requests these endpoints with "COPY" using the password of user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -121,18 +97,12 @@ Feature: COPY file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send COPY requests to webDav endpoints without any authentication using the spaces WebDAV API
When a user requests these endpoints with "COPY" with no authentication about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"


Scenario: send COPY requests to webDav endpoints with body as normal user
When user "Alice" requests these endpoints with "COPY" including body "doesnotmatter" about user "Alice"
| endpoint |
Expand All @@ -144,7 +114,7 @@ Feature: COPY file/folder
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "415"

@personalSpace
@skipOnRevaMaster
Scenario: send COPY requests to webDav endpoints with body as normal user using the spaces WebDAV API
When user "Alice" requests these endpoints with "COPY" including body "doesnotmatter" about user "Alice"
| endpoint |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ Feature: delete file/folder
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/webdav/PARENT/parent.txt |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send DELETE requests to webDav endpoints as normal user with wrong password using the spaces WebDAV API
When user "Alice" requests these endpoints with "DELETE" using password "invalid" about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -46,12 +40,6 @@ Feature: delete file/folder
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/webdav/PARENT/parent.txt |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@personalSpace
Scenario: send DELETE requests to webDav endpoints as normal user with no password using the spaces WebDAV API
When user "Alice" requests these endpoints with "DELETE" using password "" about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -66,7 +54,7 @@ Feature: delete file/folder
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "404"

@personalSpace
@skipOnRevaMaster
Scenario: send DELETE requests to another user's webDav endpoints as normal user using the spaces WebDAV API
When user "Brian" requests these endpoints with "DELETE" about user "Alice"
| endpoint |
Expand All @@ -84,12 +72,6 @@ Feature: delete file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send DELETE requests to webDav endpoints using invalid username but correct password using the spaces WebDAV API
When user "usero" requests these endpoints with "DELETE" using the password of user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -104,12 +86,6 @@ Feature: delete file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@personalSpace
Scenario: send DELETE requests to webDav endpoints using valid password and username of different user using the spaces WebDAV API
When user "Brian" requests these endpoints with "DELETE" using the password of user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -124,18 +100,12 @@ Feature: delete file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send DELETE requests to webDav endpoints without any authentication using the spaces WebDAV API
When a user requests these endpoints with "DELETE" with no authentication about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"


Scenario: send DELETE requests to webDav endpoints with body as normal user
When user "Alice" requests these endpoints with "DELETE" including body "doesnotmatter" about user "Alice"
| endpoint |
Expand All @@ -146,7 +116,7 @@ Feature: delete file/folder
| /remote.php/dav/files/%username%/FOLDER |
Then the HTTP status code of responses on all endpoints should be "415"

@personalSpace
@skipOnRevaMaster
Scenario: send DELETE requests to webDav endpoints with body as normal user using the spaces WebDAV API
When user "Alice" requests these endpoints with "DELETE" including body "doesnotmatter" about user "Alice"
| endpoint |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ Feature: LOCK file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send LOCK requests to webDav endpoints as normal user with wrong password using the spaces WebDAV API
When user "Alice" requests these endpoints with "LOCK" including body "doesnotmatter" using password "invalid" about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -44,12 +38,6 @@ Feature: LOCK file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send LOCK requests to webDav endpoints as normal user with no password using the spaces WebDAV API
When user "Alice" requests these endpoints with "LOCK" including body "doesnotmatter" using password "" about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -67,7 +55,7 @@ Feature: LOCK file/folder
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "409"

@issue-1347 @personalSpace
@issue-1347 @skipOnRevaMaster
Scenario: send LOCK requests to another user's webDav endpoints as normal user using the spaces WebDAV API
When user "Brian" requests these endpoints with "LOCK" to get property "d:shared" about user "Alice"
| endpoint |
Expand All @@ -88,12 +76,6 @@ Feature: LOCK file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@personalSpace
Scenario: send LOCK requests to webDav endpoints using invalid username but correct password using the spaces WebDAV API
When user "usero" requests these endpoints with "LOCK" including body "doesnotmatter" using the password of user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -108,12 +90,6 @@ Feature: LOCK file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@personalSpace
Scenario: send LOCK requests to webDav endpoints using valid password and username of different user using the spaces WebDAV API
When user "Brian" requests these endpoints with "LOCK" including body "doesnotmatter" using the password of user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand All @@ -128,12 +104,6 @@ Feature: LOCK file/folder
| /remote.php/webdav/PARENT |
| /remote.php/dav/files/%username%/PARENT |
| /remote.php/dav/files/%username%/PARENT/parent.txt |
Then the HTTP status code of responses on all endpoints should be "401"

@smokeTest @personalSpace
Scenario: send LOCK requests to webDav endpoints without any authentication using the spaces WebDAV API
When a user requests these endpoints with "LOCK" with body "doesnotmatter" and no authentication about user "Alice"
| endpoint |
| /remote.php/dav/spaces/%spaceid%/textfile0.txt |
| /remote.php/dav/spaces/%spaceid%/PARENT |
| /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt |
Expand Down
Loading

0 comments on commit 54a1fa0

Please sign in to comment.