Skip to content

Commit

Permalink
tests:move tests from coreApiWebdavLocksUnlock/unlockSharingToShares.…
Browse files Browse the repository at this point in the history
…feature to local api
  • Loading branch information
SwikritiT committed Nov 21, 2023
1 parent 74dc366 commit baaea7e
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 160 deletions.
32 changes: 0 additions & 32 deletions tests/acceptance/expected-failures-API-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,38 +59,6 @@ Synchronization features like etag propagation, setting mtime and locking files
- [coreApiMain/checksums.feature:258](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiMain/checksums.feature#L258)
- [coreApiMain/checksums.feature:263](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiMain/checksums.feature#L263)

#### [Webdav LOCK operations](https://github.com/owncloud/ocis/issues/1284)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:27](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L27)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:28](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L28)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:29](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L29)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:30](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L30)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:35](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L35)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:36](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L36)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:50](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L50)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:51](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L51)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:52](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L52)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:53](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L53)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:58](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L58)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:59](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L59)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:73](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L73)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:74](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L74)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:75](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L75)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:76](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L76)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:81](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L81)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:82](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L82)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:96](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L96)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:97](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L97)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:98](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L98)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:99](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L99)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:104](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L104)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:105](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L105)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:119](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L119)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:120](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L120)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:121](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L121)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:122](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L122)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:127](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L127)
- [coreApiWebdavLocksUnlock/unlockSharingToShares.feature:128](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavLocksUnlock/unlockSharingToShares.feature#L128)

### Share

File and sync features in a shared scenario
Expand Down
32 changes: 32 additions & 0 deletions tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,24 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiLocks/unlockFiles.feature:60](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L60)
- [apiLocks/unlockFiles.feature:61](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L61)
- [apiLocks/unlockFiles.feature:62](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L62)
- [apiLocks/unlockFiles.feature:151](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L151)
- [apiLocks/unlockFiles.feature:152](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L152)
- [apiLocks/unlockFiles.feature:153](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L153)
- [apiLocks/unlockFiles.feature:154](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L154)
- [apiLocks/unlockFiles.feature:155](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L155)
- [apiLocks/unlockFiles.feature:156](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L156)
- [apiLocks/unlockFiles.feature:173](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L173)
- [apiLocks/unlockFiles.feature:174](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L174)
- [apiLocks/unlockFiles.feature:175](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L175)
- [apiLocks/unlockFiles.feature:176](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L176)
- [apiLocks/unlockFiles.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L177)
- [apiLocks/unlockFiles.feature:178](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L178)
- [apiLocks/unlockFiles.feature:195](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L195)
- [apiLocks/unlockFiles.feature:196](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L196)
- [apiLocks/unlockFiles.feature:197](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L197)
- [apiLocks/unlockFiles.feature:198](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L198)
- [apiLocks/unlockFiles.feature:199](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L199)
- [apiLocks/unlockFiles.feature:200](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L200)

#### [Trying to upload to a locked file gives 500](https://github.com/owncloud/ocis/issues/7638)

Expand Down Expand Up @@ -199,5 +217,19 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiLocks/unlockFiles.feature:44](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L44)
- [apiLocks/unlockFiles.feature:45](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L45)

### [Trying to unlock a shared file with sharer's lock token gives 500](https://github.com/owncloud/ocis/issues/7767)
- [apiLocks/unlockFiles.feature:107](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L107)
- [apiLocks/unlockFiles.feature:108](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L108)
- [apiLocks/unlockFiles.feature:109](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L109)
- [apiLocks/unlockFiles.feature:110](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L110)
- [apiLocks/unlockFiles.feature:111](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L111)
- [apiLocks/unlockFiles.feature:112](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L112)
- [apiLocks/unlockFiles.feature:129](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L129)
- [apiLocks/unlockFiles.feature:130](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L130)
- [apiLocks/unlockFiles.feature:131](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L131)
- [apiLocks/unlockFiles.feature:132](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L132)
- [apiLocks/unlockFiles.feature:133](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L133)
- [apiLocks/unlockFiles.feature:134](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L134)

- Note: always have an empty line at the end of this file.
The bash script that processes this file requires that the last line has a newline on the end.
110 changes: 110 additions & 0 deletions tests/acceptance/features/apiLocks/unlockFiles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,116 @@ Feature: unlock locked items
| spaces | shared |
| spaces | exclusive |

@issue-7767
Scenario Outline: trying to unlock a shared file that has been locked by the file owner
Given user "Brian" has been created with default attributes and without skeleton files
And using <dav-path-version> 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 shared file "PARENT/parent.txt" with user "Brian"
And user "Alice" has locked file "PARENT/parent.txt" setting the following properties
| lockscope | <lock-scope> |
When user "Brian" unlocks file "Shares/parent.txt" with the last created lock of file "PARENT/parent.txt" of user "Alice" using the WebDAV API
Then the HTTP status code should be "403"
And 1 locks should be reported for file "PARENT/parent.txt" of user "Alice" by the WebDAV API
And 1 locks should be reported for file "Shares/parent.txt" of user "Brian" by the WebDAV API
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |


Scenario Outline: trying to unlock a file inside the shared folder that has been locked by the file owner
Given user "Brian" has been created with default attributes and without skeleton files
And using <dav-path-version> 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 locked file "PARENT/parent.txt" setting the following properties
| lockscope | <lock-scope> |
And user "Alice" has shared folder "PARENT" with user "Brian"
When user "Brian" unlocks file "Shares/PARENT/parent.txt" with the last created lock of file "PARENT/parent.txt" of user "Alice" using the WebDAV API
Then the HTTP status code should be "403"
And 1 locks should be reported for file "PARENT/parent.txt" of user "Alice" by the WebDAV API
And 1 locks should be reported for file "Shares/PARENT/parent.txt" of user "Brian" by the WebDAV API
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |

@issue-7599
Scenario Outline: sharee unlocks a shared file
Given user "Brian" has been created with default attributes and without skeleton files
And using <dav-path-version> 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 shared file "PARENT/parent.txt" with user "Brian"
And user "Brian" has locked file "Shares/parent.txt" setting the following properties
| lockscope | <lock-scope> |
When user "Brian" unlocks the last created lock of file "Shares/parent.txt" using the WebDAV API
Then the HTTP status code should be "204"
And 0 locks should be reported for file "PARENT/parent.txt" of user "Alice" by the WebDAV API
And 0 locks should be reported for file "Shares/parent.txt" of user "Brian" by the WebDAV API
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |

@issue-7599
Scenario Outline: try to unlock a shared file locked by the receiver
Given user "Brian" has been created with default attributes and without skeleton files
And using <dav-path-version> 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 shared file "PARENT/parent.txt" with user "Brian"
And user "Brian" has locked file "Shares/parent.txt" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" unlocks file "PARENT/parent.txt" with the last created lock of file "Shares/parent.txt" of user "Brian" using the WebDAV API
Then the HTTP status code should be "403"
And 1 locks should be reported for file "PARENT/parent.txt" of user "Alice" by the WebDAV API
And 1 locks should be reported for file "Shares/parent.txt" of user "Brian" by the WebDAV API
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |

@issue-7599
Scenario Outline: try to unlock a file in a shared folder, which was locked by the sharee as the owner
Given user "Brian" has been created with default attributes and without skeleton files
And using <dav-path-version> 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 shared folder "PARENT" with user "Brian"
And user "Brian" has locked file "Shares/PARENT/parent.txt" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" unlocks file "PARENT/parent.txt" with the last created lock of file "Shares/PARENT/parent.txt" of user "Brian" using the WebDAV API
Then the HTTP status code should be "403"
And 1 locks should be reported for file "PARENT/parent.txt" of user "Alice" by the WebDAV API
And 1 locks should be reported for file "Shares/PARENT/parent.txt" of user "Brian" by the WebDAV API
Examples:
| dav-path-version | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
| spaces | shared |
| spaces | exclusive |

@issue-7696
Scenario Outline: unlock a locked file in project space
Given using spaces DAV path
Expand Down
Loading

0 comments on commit baaea7e

Please sign in to comment.