From 07ea77fac316171244b438812b98d5f392be553a Mon Sep 17 00:00:00 2001 From: Swikriti Tripathi Date: Mon, 20 Nov 2023 16:59:03 +0545 Subject: [PATCH] test:add failing test to expected to failure Signed-off-by: Swikriti Tripathi --- .../expected-failures-localAPI-on-OCIS-storage.md | 13 ++++++++++++- .../features/apiLocks/unlockFiles.feature | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 7ac1bd11b54..7aed27e08dc 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -163,6 +163,9 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiLocks/lockFiles.feature:349](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L349) - [apiLocks/lockFiles.feature:350](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L350) - [apiLocks/lockFiles.feature:351](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L351) +- [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) #### [Trying to upload to a locked file gives 500](https://github.com/owncloud/ocis/issues/7638) @@ -187,5 +190,13 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiLocks/lockFiles.feature:368](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L368) - [apiLocks/lockFiles.feature:369](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/lockFiles.feature#L369) -Note: always have an empty line at the end of this file. +### [Public can unlock a file if they get the lock token](https://github.com/owncloud/ocis/issues/7761) +- [apiLocks/unlockFiles.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L40) +- [apiLocks/unlockFiles.feature:41](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L41) +- [apiLocks/unlockFiles.feature:42](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L42) +- [apiLocks/unlockFiles.feature:43](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiLocks/unlockFiles.feature#L43) +- [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) + +- 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. diff --git a/tests/acceptance/features/apiLocks/unlockFiles.feature b/tests/acceptance/features/apiLocks/unlockFiles.feature index 3d46d4bb46b..7f89d8001b9 100644 --- a/tests/acceptance/features/apiLocks/unlockFiles.feature +++ b/tests/acceptance/features/apiLocks/unlockFiles.feature @@ -21,7 +21,7 @@ Feature: unlock locked items | new | | spaces | - + @issue-7761 Scenario Outline: public tries to unlock a file in a share that was locked by the file owner Given using DAV path And user "Alice" has created folder "PARENT" @@ -33,8 +33,8 @@ Feature: unlock locked items And user "Alice" has locked file "PARENT/parent.txt" setting the following properties | lockscope | | When the public unlocks file "/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 "204" - And 0 locks should be reported for file "PARENT/parent.txt" of user "Alice" by 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 Examples: | dav-path-version | lock-scope | | old | shared |