aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-08-02 14:30:52 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-08-12 11:28:03 +0200
commitcb1b366baf75da4c578bc534884eefa7f6b4b3d2 (patch)
treebdb367d502a6990c39165960a76d3268270162ef /build/integration
parent1a7acf061e26d938e2162f791afb262dc7c2b90d (diff)
downloadnextcloud-server-cb1b366baf75da4c578bc534884eefa7f6b4b3d2.tar.gz
nextcloud-server-cb1b366baf75da4c578bc534884eefa7f6b4b3d2.zip
fix(dav): Ensure share properties are also set on public remote endpoint
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'build/integration')
-rw-r--r--build/integration/dav_features/dav-v2-public.feature22
-rw-r--r--build/integration/features/bootstrap/WebDav.php27
-rwxr-xr-xbuild/integration/run-docker.sh6
3 files changed, 51 insertions, 4 deletions
diff --git a/build/integration/dav_features/dav-v2-public.feature b/build/integration/dav_features/dav-v2-public.feature
new file mode 100644
index 00000000000..773fc2c1d73
--- /dev/null
+++ b/build/integration/dav_features/dav-v2-public.feature
@@ -0,0 +1,22 @@
+# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+# SPDX-License-Identifier: AGPL-3.0-or-later
+Feature: dav-v2-public
+ Background:
+ Given using api version "1"
+
+ Scenario: See note to recipient in public shares
+ Given using new dav path
+ And As an "admin"
+ And user "user0" exists
+ And user "user1" exists
+ And As an "user1"
+ And user "user1" created a folder "/testshare"
+ And as "user1" creating a share with
+ | path | testshare |
+ | shareType | 3 |
+ | permissions | 1 |
+ | note | Hello |
+ And As an "user0"
+ Given using new public dav path
+ When Requesting share note on dav endpoint
+ Then the single response should contain a property "{http://nextcloud.org/ns}note" with value "Hello"
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 852317f76a3..fff990fc141 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -52,6 +52,14 @@ trait WebDav {
$this->usingOldDavPath = false;
}
+ /**
+ * @Given /^using new public dav path$/
+ */
+ public function usingNewPublicDavPath() {
+ $this->davPath = "public.php/dav";
+ $this->usingOldDavPath = false;
+ }
+
public function getDavFilesPath($user) {
if ($this->usingOldDavPath === true) {
return $this->davPath;
@@ -75,7 +83,7 @@ trait WebDav {
];
if ($user === 'admin') {
$options['auth'] = $this->adminUser;
- } else {
+ } elseif ($user !== '') {
$options['auth'] = [$user, $this->regularUser];
}
return $client->request($method, $fullUrl, $options);
@@ -942,6 +950,23 @@ trait WebDav {
}
/**
+ * @When Requesting share note on dav endpoint
+ */
+ public function requestingShareNote() {
+ $propfind = '<d:propfind xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns"><d:prop><nc:note /></d:prop></d:propfind>';
+ if (count($this->lastShareData->data->element) > 0) {
+ $token = $this->lastShareData->data[0]->token;
+ } else {
+ $token = $this->lastShareData->data->token;
+ }
+ try {
+ $this->response = $this->makeDavRequest('', 'PROPFIND', $token, [], $propfind);
+ } catch (\GuzzleHttp\Exception\ClientException $e) {
+ $this->response = $e->getResponse();
+ }
+ }
+
+ /**
* @Then there are no duplicate headers
*/
public function thereAreNoDuplicateHeaders() {
diff --git a/build/integration/run-docker.sh b/build/integration/run-docker.sh
index f49fd3ea650..11563c9aa21 100755
--- a/build/integration/run-docker.sh
+++ b/build/integration/run-docker.sh
@@ -201,7 +201,7 @@ cd "$(dirname $0)"
# "--image XXX" option can be provided to set the Docker image to use to run
# the integration tests (one of the "nextcloudci/phpX.Y:phpX.Y-Z" or
# "ghcr.io/nextcloud/continuous-integration-integration-phpX.Y:latest" images).
-NEXTCLOUD_LOCAL_IMAGE="ghcr.io/nextcloud/continuous-integration-integration-php8.0:latest"
+NEXTCLOUD_LOCAL_IMAGE="ghcr.io/nextcloud/continuous-integration-integration-php8.1:latest"
if [ "$1" = "--image" ]; then
NEXTCLOUD_LOCAL_IMAGE=$2
@@ -227,9 +227,9 @@ fi
# "--database-image XXX" option can be provided to set the Docker image to use
# for the database container (ignored when using "sqlite").
if [ "$DATABASE" = "mysql" ]; then
- DATABASE_IMAGE="mysql:5.7"
+ DATABASE_IMAGE="mysql:8.4"
elif [ "$DATABASE" = "pgsql" ]; then
- DATABASE_IMAGE="postgres:10"
+ DATABASE_IMAGE="postgres:15"
fi
if [ "$1" = "--database-image" ]; then
DATABASE_IMAGE=$2