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] added spaces examples in the api WebDAV locks suite #39749

Merged
merged 1 commit into from
Feb 7, 2022
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
51 changes: 51 additions & 0 deletions tests/acceptance/features/apiWebdavLocks/exclusiveLocks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ Feature: there can be only one exclusive lock on a resource
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: if a parent resource is exclusively locked a child resource cannot be locked again
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
Expand All @@ -38,6 +45,13 @@ Feature: there can be only one exclusive lock on a resource
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: if a parent resource is exclusively locked with depth 0 a child resource can be locked again
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
Expand All @@ -57,6 +71,12 @@ Feature: there can be only one exclusive lock on a resource
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@skipOnOcV10 @issue-34358
Scenario Outline: if a child resource is exclusively locked a parent resource cannot be locked again
Given using <dav-path> DAV path
Expand All @@ -76,6 +96,13 @@ Feature: there can be only one exclusive lock on a resource
| new | shared |
| new | exclusive |

@personalSpace
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: if a child resource is exclusively locked a parent resource can be locked with depth 0
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
Expand All @@ -95,6 +122,12 @@ Feature: there can be only one exclusive lock on a resource
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@files_sharing-app-required
Scenario Outline: a share receiver cannot lock a resource exclusively locked by itself
Given using <dav-path> DAV path
Expand All @@ -116,6 +149,12 @@ Feature: there can be only one exclusive lock on a resource
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@files_sharing-app-required
Scenario Outline: a share receiver cannot lock a resource exclusively locked by the owner
Given using <dav-path> DAV path
Expand All @@ -137,6 +176,12 @@ Feature: there can be only one exclusive lock on a resource
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@files_sharing-app-required
Scenario Outline: a share owner cannot lock a resource exclusively locked by a share receiver
Given using <dav-path> DAV path
Expand All @@ -157,3 +202,9 @@ Feature: there can be only one exclusive lock on a resource
| old | exclusive |
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |
47 changes: 47 additions & 0 deletions tests/acceptance/features/apiWebdavLocks/folder.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ Feature: lock folders
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: upload to a subfolder of a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
Expand All @@ -36,6 +43,12 @@ Feature: lock folders
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@smokeTest
Scenario Outline: create folder in a locked folder
Given using <dav-path> DAV path
Expand All @@ -52,6 +65,13 @@ Feature: lock folders
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: create folder in a subfolder of a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
Expand All @@ -68,6 +88,13 @@ Feature: lock folders
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: Move file out of a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
Expand All @@ -85,6 +112,13 @@ Feature: lock folders
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: Move file out of a locked sub folder one level higher into locked parent folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
Expand All @@ -103,6 +137,13 @@ Feature: lock folders
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: lockdiscovery of a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
Expand All @@ -120,3 +161,9 @@ Feature: lock folders
| old | exclusive | /%base_path%\/remote.php\/webdav\/PARENT$/ |
| new | shared | /%base_path%\/remote.php\/dav\/files\/%username%\/PARENT$/ |
| new | exclusive | /%base_path%\/remote.php\/dav\/files\/%username%\/PARENT$/ |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope | lock-root |
| spaces | shared | /%base_path%\/remote.php\/dav\/spaces\/%spaceid%\/PARENT$/ |
| spaces | exclusive | /%base_path%\/remote.php\/dav\/spaces\/%spaceid%\/PARENT$/ |
11 changes: 10 additions & 1 deletion tests/acceptance/features/apiWebdavLocks/publicLink.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ Feature: persistent-locking in case of a public link
| new | shared | new |
| new | exclusive | new |

@skipOnOcV10 @personalSpace
Examples:
| dav-path | lock-scope | webdav_api_version |
| spaces | shared | old |
| spaces | exclusive | old |
| spaces | shared | new |
| spaces | exclusive | new |
| spaces | shared | spaces |
| spaces | exclusive | spaces |

@skipOnOcV10.6 @skipOnOcV10.7
Scenario Outline: Uploading a file into a locked subfolder of a public folder
Given user "Alice" has created a public link share of folder "PARENT" with change permission
Expand Down Expand Up @@ -101,7 +111,6 @@ Feature: persistent-locking in case of a public link
| old | shared |
| old | exclusive |


Examples:
| public-webdav-api-version | lock-scope |
| new | shared |
Expand Down
51 changes: 41 additions & 10 deletions tests/acceptance/features/apiWebdavLocks/requestsWithToken.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Feature: actions on a locked item are possible if the token is sent with the req
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@smokeTest
Scenario Outline: move a file into a locked folder
Given using <dav-path> DAV path
Expand All @@ -41,6 +47,12 @@ Feature: actions on a locked item are possible if the token is sent with the req
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@smokeTest
Scenario Outline: move a file into a locked folder is impossible when using the wrong token
Given using <dav-path> DAV path
Expand All @@ -63,16 +75,23 @@ Feature: actions on a locked item are possible if the token is sent with the req
| new | shared |
| new | exclusive |

@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@skipOnOcV10 @issue-34338 @files_sharing-app-required
Scenario Outline: share receiver cannot rename a file in a folder locked by the owner even when sending the locktoken
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "PARENT/parent.txt"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/parent.txt"
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has shared folder "PARENT" with user "Brian"
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Brian" moves file "PARENT/parent.txt" to "PARENT/renamed-file.txt" sending the locktoken of file "PARENT" of user "Alice" using the WebDAV API
When user "Brian" moves file "Shares/PARENT/parent.txt" to "Shares/PARENT/renamed-file.txt" sending the locktoken of file "PARENT" of user "Alice" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/PARENT/parent.txt" should exist
But as "Alice" file "/PARENT/renamed-file.txt" should not exist
Expand All @@ -83,6 +102,12 @@ Feature: actions on a locked item are possible if the token is sent with the req
| new | shared |
| new | exclusive |

@personalSpace
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |

@files_sharing-app-required
Scenario Outline: public cannot overwrite a file in a folder locked by the owner even when sending the locktoken
Given user "Alice" has created folder "PARENT"
Expand Down Expand Up @@ -112,20 +137,26 @@ Feature: actions on a locked item are possible if the token is sent with the req
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "some data" to "textfile0.txt"
And user "Brian" has uploaded file with content "some data" to "textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has shared file "/textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Alice" has locked file "textfile0.txt" setting the following properties
| lockscope | shared |
And user "Brian" has locked file "textfile0 (2).txt" setting the following properties
And user "Brian" has locked file "Shares/textfile0.txt" setting the following properties
amrita-shrestha marked this conversation as resolved.
Show resolved Hide resolved
| lockscope | shared |
When user "Alice" uploads file with content "from user 0" to "textfile0.txt" sending the locktoken of file "textfile0.txt" using the WebDAV API
Then the HTTP status code should be "200"
Then the HTTP status code should be "204"
And the content of file "textfile0.txt" for user "Alice" should be "from user 0"
And the content of file "textfile0 (2).txt" for user "Brian" should be "from user 0"
When user "Brian" uploads file with content "from user 1" to "textfile0 (2).txt" sending the locktoken of file "textfile0 (2).txt" using the WebDAV API
Then the HTTP status code should be "200"
And the content of file "Shares/textfile0.txt" for user "Brian" should be "from user 0"
When user "Brian" uploads file with content "from user 1" to "Shares/textfile0.txt" sending the locktoken of file "Shares/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile0.txt" for user "Alice" should be "from user 1"
And the content of file "textfile0 (2).txt" for user "Brian" should be "from user 1"
And the content of file "Shares/textfile0.txt" for user "Brian" should be "from user 1"
Examples:
| dav-path |
| old |
| new |

@personalSpace
Examples:
| dav-path |
| spaces |