From 479835779a75e51d6c020bb91be841b9ffdb0364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Tue, 9 May 2023 10:48:24 +0200 Subject: [PATCH] Adapt test expectations. We do not allow sharing of the space root. --- ...hareDefaultFolderForReceivedShares.feature | 4 +-- .../createPublicLinkShare.feature | 25 ++++--------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareDefaultFolderForReceivedShares.feature b/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareDefaultFolderForReceivedShares.feature index f0eb81eeef..ea2a685ee4 100644 --- a/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareDefaultFolderForReceivedShares.feature +++ b/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareDefaultFolderForReceivedShares.feature @@ -20,5 +20,5 @@ Feature: shares are received in the default folder for received shares And the HTTP status code of responses on each endpoint should be "" respectively Examples: | ocs_api_version | ocs_status_code | http_status_code | - | 1 | 100, 100, 404 | 200, 200, 204, 200 | - | 2 | 200, 200, 404 | 200, 200, 204, 404 | + | 1 | 100, 100, 400 | 200, 200, 204, 200 | + | 2 | 200, 200, 400 | 200, 200, 204, 400 | diff --git a/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature b/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature index 68a12369da..97d6fe9da5 100644 --- a/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature +++ b/tests/acceptance/features/coreApiSharePublicLink1/createPublicLinkShare.feature @@ -282,31 +282,16 @@ Feature: create a public link share | 2 | 200 | @issue-1265 @issue-2079 - Scenario Outline: allow public sharing of the root on OCIS when the default permission is read and access using the public WebDAV API + Scenario Outline: Do not allow public sharing of the root on OCIS when the default permission is read and access using the public WebDAV API Given using OCS API version "" - And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt" When user "Alice" creates a public link share using the sharing API with settings | path | / | Then the OCS status code should be "" - And the HTTP status code should be "200" - And the fields of the last response to user "Alice" should include - | item_type | folder | - | mimetype | httpd/unix-directory | - | file_target | / | - | path | / | - | permissions | read | - | share_type | public_link | - | displayname_file_owner | %displayname% | - | displayname_owner | %displayname% | - | uid_file_owner | %username% | - | uid_owner | %username% | - | name | | - And the public should be able to download file "/randomfile.txt" from inside the last public link shared folder using the new public WebDAV API without password and the content should be "Random data" - And the public upload to the last publicly shared folder using the new public WebDAV API should fail with HTTP status code "403" + And the HTTP status code should be "" Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | + | ocs_api_version | ocs_status_code | http_status_code | + | 1 | 400 | 200 | + | 2 | 400 | 400 | @issue-2079 Scenario Outline: user creates a public link share of a file with file name longer than 64 chars using the public WebDAV API