From 2ca62051b04308515446f01e653a784ca6524aa5 Mon Sep 17 00:00:00 2001 From: Artur Neumann Date: Fri, 6 May 2022 12:38:46 +0545 Subject: [PATCH 01/10] [docs-only] improve docs of running API acceptance tests (#3707) Co-authored-by: Phil Davis --- docs/ocis/development/testing.md | 37 +++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/docs/ocis/development/testing.md b/docs/ocis/development/testing.md index 1439e67c6c..b3fa042e9c 100644 --- a/docs/ocis/development/testing.md +++ b/docs/ocis/development/testing.md @@ -9,7 +9,7 @@ geekdocFilePath: testing.md {{< toc >}} -For running tests in the test suite you have two options. You may go the easy way and just run the test suite in docker. But for some tasks you could also need to install the test suite natively, which requires a little bit more setup since PHP and some dependencies need to be installed. +To run tests in the test suite you have two options. You may go the easy way and just run the test suite in docker. But for some tasks you could also need to install the test suite natively, which requires a little more setup since PHP and some dependencies need to be installed. Both ways to run tests with the test suites are described here. @@ -26,14 +26,14 @@ Basically we have two sources for feature tests and test suites: - [oCIS feature test and test suites](https://github.com/owncloud/ocis/tree/master/tests/acceptance/features) - [ownCloud feature tests and test suites](https://github.com/owncloud/core/tree/master/tests/acceptance/features) -At the moment both can be applied to oCIS since the api of oCIS is designed to be compatible to ownCloud. +At the moment both can be applied to oCIS since the api of oCIS is designed to be compatible with ownCloud. -Since we have to offer a migration path to existing users of ownCloud, you can use your existing ownCloud as storage backend for oCIS. As another storage backend we offer oCIS native storage, also called "oCIS". This stores files directly on disk. Which storage backend is used is also reflected in the tests, there are always different tests for oCIS storage and ownCloud storage. +Since we have to offer a migration path to existing users of ownCloud, you can use your existing ownCloud as the storage backend for oCIS. As another storage backend we offer oCIS native storage, also called "oCIS". This stores files directly on disk. Which storage backend is used is also reflected in the tests, there are always different tests for oCIS storage and ownCloud storage. You can invoke two types of test suite runs: - run a full test suite, which consists of multiple feature tests -- run a single feature test +- run a single feature or single scenario in a feature ### Run full test suite @@ -45,7 +45,7 @@ For example `make -C tests/acceptance/docker Core-API-Tests-owncloud-storage-3`r ### Run single feature test -The single feature tests can also be run against the different storage backends. Therefore multiple make targets with the schema test--feature- exists. For selecting a single feature test you have to add an additional `BEHAT_FEATURE=...` parameter when invoking the make command: +The single feature tests can also be run against the different storage backends. Therefore, multiple make targets with the schema test--feature- exist. To select a single feature you have to add an additional `BEHAT_FEATURE=...` parameter when invoking the make command: ``` make -C tests/acceptance/docker test-ocis-feature-ocis-storage BEHAT_FEATURE='tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature' @@ -53,9 +53,15 @@ make -C tests/acceptance/docker test-ocis-feature-ocis-storage BEHAT_FEATURE='te This must be pointing to a valid feature definition. +To run a single scenario in a feature, then mention the line number of the scenario: + +``` +make -C tests/acceptance/docker test-ocis-feature-ocis-storage BEHAT_FEATURE='tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature:20' +``` + ### oCIS image to be tested (or: skip build and take existing image) -By default, the tests will be run against the docker image built from your current working state of the oCIS repository. For some purposes it might also be handy to use a oCIS image from Docker Hub. Therefore you can provide the optional flag `OCIS_IMAGE_TAG=...` which must contain an available docker tag of the [owncloud/ocis registry on Docker Hub](https://hub.docker.com/r/owncloud/ocis) (e.g. 'latest'). +By default, the tests will be run against the docker image built from your current working state of the oCIS repository. For some purposes it might also be handy to use an oCIS image from Docker Hub. Therefore, you can provide the optional flag `OCIS_IMAGE_TAG=...` which must contain an available docker tag of the [owncloud/ocis registry on Docker Hub](https://hub.docker.com/r/owncloud/ocis) (e.g. 'latest'). ``` make -C tests/acceptance/docker localApiTests-apiAccountsHashDifficulty-ocis OCIS_IMAGE_TAG=latest @@ -95,11 +101,13 @@ git clone https://github.com/owncloud/core.git ### Run ocis +Create an up-to-date ocis binary by [building oCIS]({{< ref "build" >}}) + To start ocis: ```bash -ocis init -OCIS_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true bin/ocis server +IDM_ADMIN_PASSWORD=admin ocis/bin/ocis init --insecure true +OCIS_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true ocis/bin/ocis server ``` `PROXY_ENABLE_BASIC_AUTH` will allow the acceptance tests to make requests against the provisioning api (and other endpoints) using basic auth. @@ -118,29 +126,32 @@ Then run the api acceptance tests with the following command from the root of th ```bash make test-acceptance-api \ TEST_SERVER_URL=https://localhost:9200 \ +TEST_WITH_GRAPH_API=true \ +PATH_TO_OCIS=/var/www/ocis \ +PATH_TO_CORE=. \ TEST_OCIS=true \ STORAGE_DRIVER=OCIS \ SKELETON_DIR=apps/testing/data/apiSkeleton \ BEHAT_FILTER_TAGS='~@notToImplementOnOCIS&&~@toImplementOnOCIS' ``` -Make sure to adjust the settings `TEST_SERVER_URL` and `OCIS_REVA_DATA_ROOT` according to your environment. +Make sure to adjust the settings `TEST_SERVER_URL` and `PATH_TO_OCIS` according to your environment. This will run all tests that are relevant to oCIS. -To run a single test add `BEHAT_FEATURE=` +To run a single feature add `BEHAT_FEATURE=` To run tests with a different storage driver set `STORAGE_DRIVER` to the correct value. It can be set to `OCIS` or `OWNCLOUD` and uses `OWNCLOUD` as the default value. ### use existing tests for BDD As a lot of scenarios are written for oC10, we can use those tests for Behaviour driven development in ocis. -Every scenario that does not work in oCIS with "owncloud" storage, is listed in `tests/acceptance/expected-failures-on-OWNCLOUD-storage.md` with a link to the related issue. Every scenario that does not work in oCIS with "ocis" storage, is listed in `tests/acceptance/expected-failures-on-OCIS-storage.md` with a link to the related issue. Those scenarios are run in the ordinary acceptance test pipeline in CI. The scenarios that fail are checked against the expected failures. If there are any differences then the CI pipeline fails. -Similarly, scenarios that do not work in oCIS with EOS storage are listed in `tests/acceptance/expected-failures-on-EOS-storage.md`. + +The tests are not currently run in CI with the OWNCLOUD or EOS storage drivers, so there are no expected-failures files for those. If you want to work on a specific issue @@ -212,7 +223,7 @@ SKELETON_DIR="/apps/testing/data/apiSkeleton" Replace `` with the actual path to the root directory of core repo that you have cloned earlier. -In order to run a single test, use `BEHAT_FEATURE` environment variable. +In order to run a single test, use the `BEHAT_FEATURE` environment variable. ```bash make test-paralleldeployment-api \ From 357b7f0064815aba985c1c3ace5464816a1edef8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 06:57:24 +0000 Subject: [PATCH 02/10] Bump github.com/onsi/ginkgo/v2 from 2.1.3 to 2.1.4 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.1.3 to 2.1.4. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.1.3...v2.1.4) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 4ee4109737..9f0b45e1d7 100644 --- a/go.mod +++ b/go.mod @@ -53,7 +53,7 @@ require ( github.com/oklog/run v1.1.0 github.com/olekukonko/tablewriter v0.0.5 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/ginkgo/v2 v2.1.3 + github.com/onsi/ginkgo/v2 v2.1.4 github.com/onsi/gomega v1.19.0 github.com/owncloud/libre-graph-api-go v0.13.3 github.com/pkg/errors v0.9.1 @@ -255,12 +255,12 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.19.1 // indirect - golang.org/x/mod v0.5.1 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect - golang.org/x/tools v0.1.9 // indirect + golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/ini.v1 v1.66.2 // indirect diff --git a/go.sum b/go.sum index d0ace7aff6..3793b722df 100644 --- a/go.sum +++ b/go.sum @@ -1137,8 +1137,9 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -1544,6 +1545,7 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= @@ -1595,8 +1597,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1817,6 +1820,7 @@ golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201113234701-d7a72108b828/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1924,8 +1928,9 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= -golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From ea6e743a22869df02d93feb99afb3119cef0dd4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 06:57:38 +0000 Subject: [PATCH 03/10] Bump gotest.tools/v3 from 3.1.0 to 3.2.0 Bumps [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/gotestyourself/gotest.tools/releases) - [Commits](https://github.com/gotestyourself/gotest.tools/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: gotest.tools/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4ee4109737..2b88a3aea3 100644 --- a/go.mod +++ b/go.mod @@ -80,7 +80,7 @@ require ( google.golang.org/grpc v1.46.0 google.golang.org/protobuf v1.28.0 gopkg.in/yaml.v2 v2.4.0 - gotest.tools/v3 v3.1.0 + gotest.tools/v3 v3.2.0 stash.kopano.io/kgol/rndm v1.1.1 ) diff --git a/go.sum b/go.sum index d0ace7aff6..950ffd39fa 100644 --- a/go.sum +++ b/go.sum @@ -2152,8 +2152,8 @@ gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk= -gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ= +gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 84de8d563e27a4a816beea8500bd976fe3e31f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 6 May 2022 08:43:03 +0000 Subject: [PATCH 04/10] Fix env var naming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- extensions/storage-users/pkg/config/config.go | 4 ++-- extensions/webdav/pkg/config/config.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/storage-users/pkg/config/config.go b/extensions/storage-users/pkg/config/config.go index be37a5bfbc..7d5a761b71 100644 --- a/extensions/storage-users/pkg/config/config.go +++ b/extensions/storage-users/pkg/config/config.go @@ -122,8 +122,8 @@ type OwnCloudSQLDriver struct { Root string `yaml:"root" env:"STORAGE_USERS_OWNCLOUDSQL_DATADIR"` //ShareFolder defines the name of the folder jailing all shares ShareFolder string `yaml:"share_folder" env:"STORAGE_USERS_OWNCLOUDSQL_SHARE_FOLDER"` - UserLayout string `env:"STORAGE_USERS_OWNCLOUDSQL_LAYOUT"` - UploadInfoDir string `yaml:"upload_info_dir" env:"STORAGE_USERS_UPLOADINFO_DIR"` + UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_OWNCLOUDSQL_LAYOUT" desc:"path layout to use to navigate into a users folder in an owncloud data dir"` + UploadInfoDir string `yaml:"upload_info_dir" env:"STORAGE_USERS_OWNCLOUDSQL_UPLOADINFO_DIR"` DBUsername string `yaml:"db_username" env:"STORAGE_USERS_OWNCLOUDSQL_DB_USERNAME"` DBPassword string `yaml:"db_password" env:"STORAGE_USERS_OWNCLOUDSQL_DB_PASSWORD"` DBHost string `yaml:"db_host" env:"STORAGE_USERS_OWNCLOUDSQL_DB_HOST"` diff --git a/extensions/webdav/pkg/config/config.go b/extensions/webdav/pkg/config/config.go index 014624ee32..7d381480b4 100644 --- a/extensions/webdav/pkg/config/config.go +++ b/extensions/webdav/pkg/config/config.go @@ -19,7 +19,7 @@ type Config struct { HTTP HTTP `yaml:"http"` OcisPublicURL string `yaml:"ocis_public_url" env:"OCIS_URL;OCIS_PUBLIC_URL"` - WebdavNamespace string `yaml:"webdav_namespace" env:"STORAGE_WEBDAV_NAMESPACE"` //TODO: prevent this cross config + WebdavNamespace string `yaml:"webdav_namespace" env:"WEBDAV_WEBDAV_NAMESPACE" desc:"CS3 path layout to use when forwarding /webdav requests"` //TODO: prevent this cross config RevaGateway string `yaml:"reva_gateway" env:"REVA_GATEWAY"` Context context.Context `yaml:"-"` From 84a93d24a909aa96fe16b9bb8a0080c7776a401b Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Fri, 6 May 2022 11:10:47 +0200 Subject: [PATCH 05/10] escape adoc pipe & remove linewrap in output Signed-off-by: Christian Richter --- docs/helpers/adoc-generator.go.tmpl | 2 ++ docs/templates/ADOC.tmpl | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/helpers/adoc-generator.go.tmpl b/docs/helpers/adoc-generator.go.tmpl index 0e656d0d71..e4cb929ad4 100644 --- a/docs/helpers/adoc-generator.go.tmpl +++ b/docs/helpers/adoc-generator.go.tmpl @@ -91,6 +91,8 @@ func GetAnnotatedVariables(s interface{}) []ConfigField { td := strings.Split(env, ";") re := regexp.MustCompile(`^(https?:\/\/)`) v = re.ReplaceAllString(v,"\\$1") + re = regexp.MustCompile(`(\|)`) + v = re.ReplaceAllString(v, "\\$1") fields = append(fields, ConfigField{EnvVars: td, DefaultValue: v, Description: desc, Type: value.Type().Name()}) case reflect.Ptr: // PolicySelectors in the Proxy are being skipped atm diff --git a/docs/templates/ADOC.tmpl b/docs/templates/ADOC.tmpl index 03633fa07c..36179380b7 100644 --- a/docs/templates/ADOC.tmpl +++ b/docs/templates/ADOC.tmpl @@ -9,7 +9,8 @@ {{- range .Fields}} {{ $numVars := len .EnvVars }} -| {{- range $i, $value := .EnvVars }}{{- if $i }} +{{ end }} +| {{- range $i, $value := .EnvVars }}{{- if $i }} + +{{ end -}} `{{- $value }}` {{- end }} | {{.Type}} From c4014f478efc57ac787ed6339b05c2430d48ee3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 6 May 2022 10:08:01 +0000 Subject: [PATCH 06/10] fiv spaces thumbnails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- extensions/webdav/pkg/service/v0/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/webdav/pkg/service/v0/service.go b/extensions/webdav/pkg/service/v0/service.go index dd3fbb66fd..0b2bd0bb93 100644 --- a/extensions/webdav/pkg/service/v0/service.go +++ b/extensions/webdav/pkg/service/v0/service.go @@ -209,7 +209,7 @@ func (g Webdav) SpacesThumbnail(w http.ResponseWriter, r *http.Request) { } t := r.Header.Get(TokenHeader) - fullPath := tr.Identifier + tr.Filepath + fullPath := filepath.Join(tr.Identifier, tr.Filepath) rsp, err := g.thumbnailsClient.GetThumbnail(r.Context(), &thumbnailssvc.GetThumbnailRequest{ Filepath: strings.TrimLeft(tr.Filepath, "/"), ThumbnailType: extensionToThumbnailType(strings.TrimLeft(tr.Extension, ".")), From 72c2775089b39045331c9d57e1be8c2edea804b2 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 6 May 2022 15:19:29 +0200 Subject: [PATCH 07/10] set version and namespace for ocdav service --- extensions/ocdav/pkg/command/server.go | 3 +++ .../ocdav/pkg/config/defaults/defaultconfig.go | 2 +- .../proxy/pkg/config/defaults/defaultconfig.go | 12 ++++++------ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/extensions/ocdav/pkg/command/server.go b/extensions/ocdav/pkg/command/server.go index b26defdfd1..f55c641003 100644 --- a/extensions/ocdav/pkg/command/server.go +++ b/extensions/ocdav/pkg/command/server.go @@ -11,6 +11,7 @@ import ( "github.com/owncloud/ocis/v2/extensions/ocdav/pkg/logging" "github.com/owncloud/ocis/v2/extensions/ocdav/pkg/server/debug" "github.com/owncloud/ocis/v2/extensions/ocdav/pkg/tracing" + "github.com/owncloud/ocis/v2/ocis-pkg/version" "github.com/urfave/cli/v2" ) @@ -40,6 +41,8 @@ func Server(cfg *config.Config) *cli.Command { gr.Add(func() error { s, err := ocdav.Service( + ocdav.Name(cfg.HTTP.Namespace+"."+cfg.Service.Name), + ocdav.Version(version.String), ocdav.Context(ctx), ocdav.Logger(logger.Logger), ocdav.Address(cfg.HTTP.Addr), diff --git a/extensions/ocdav/pkg/config/defaults/defaultconfig.go b/extensions/ocdav/pkg/config/defaults/defaultconfig.go index 6917ffe0be..d151762cc5 100644 --- a/extensions/ocdav/pkg/config/defaults/defaultconfig.go +++ b/extensions/ocdav/pkg/config/defaults/defaultconfig.go @@ -21,7 +21,7 @@ func DefaultConfig() *config.Config { }, HTTP: config.HTTPConfig{ Addr: "127.0.0.1:0", // :0 to pick any free local port - Namespace: "", //TODO: make this configurable for the reva micro service + Namespace: "com.owncloud.web", Protocol: "tcp", Prefix: "", }, diff --git a/extensions/proxy/pkg/config/defaults/defaultconfig.go b/extensions/proxy/pkg/config/defaults/defaultconfig.go index d43dda36fb..ae52d71213 100644 --- a/extensions/proxy/pkg/config/defaults/defaultconfig.go +++ b/extensions/proxy/pkg/config/defaults/defaultconfig.go @@ -118,27 +118,27 @@ func DefaultPolicies() []config.Policy { }, { Endpoint: "/remote.php/", - Service: "ocdav", + Service: "com.owncloud.web.ocdav", }, { Endpoint: "/dav/", - Service: "ocdav", + Service: "com.owncloud.web.ocdav", }, { Endpoint: "/webdav/", - Service: "ocdav", + Service: "com.owncloud.web.ocdav", }, { Endpoint: "/status.php", - Service: "ocdav", + Service: "com.owncloud.web.ocdav", }, { Endpoint: "/index.php/", - Service: "ocdav", + Service: "com.owncloud.web.ocdav", }, { Endpoint: "/apps/", - Service: "ocdav", + Service: "com.owncloud.web.ocdav", }, { Endpoint: "/data", From 276ee4b8f13ff2404fbf5733092558ab6c164ec8 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 6 May 2022 15:44:51 +0200 Subject: [PATCH 08/10] update reva --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 6a8a587977..f5778bd59c 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/blevesearch/bleve_index_api v1.0.1 github.com/coreos/go-oidc/v3 v3.1.0 github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde - github.com/cs3org/reva/v2 v2.3.0 + github.com/cs3org/reva/v2 v2.3.1-0.20220506133959-1ad146903c6f github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index a766f35c23..b806db1717 100644 --- a/go.sum +++ b/go.sum @@ -320,6 +320,8 @@ github.com/cs3org/reva v1.18.0 h1:MbPS5ZAa8RzKcTxAVeSDdISB3XXqLIxqB03BTN5ReBY= github.com/cs3org/reva v1.18.0/go.mod h1:e5VDUDu4vVWIeVkZcW//n6UZzhGGMa+Tz/whCiX3N6o= github.com/cs3org/reva/v2 v2.3.0 h1:AwDwqqzAKTrkBz1ifOy3U92C12zk92uBw6LyhLAjCBc= github.com/cs3org/reva/v2 v2.3.0/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= +github.com/cs3org/reva/v2 v2.3.1-0.20220506133959-1ad146903c6f h1:1vv8pODAoBgFGCP7UGoQCxvY6hK3vb6KirlqUNRcRys= +github.com/cs3org/reva/v2 v2.3.1-0.20220506133959-1ad146903c6f/go.mod h1:2e/4HcIy54Mic3V7Ow0bz4n5dkZU0dHIZSWomFe5vng= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= From cf83fe324adc4e0964f28d6cc63e35d95487d3a2 Mon Sep 17 00:00:00 2001 From: Pascal Wengerter Date: Fri, 6 May 2022 17:05:42 +0200 Subject: [PATCH 09/10] Bump web to v5.5.0-rc.4 --- .drone.env | 2 +- changelog/unreleased/update-web-5.5.0.md | 7 ++++--- extensions/web/Makefile | 2 +- .../expected-failures-webUI-on-OCIS-storage.md | 13 +++++++++++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.drone.env b/.drone.env index c04977ca73..52b4541d11 100644 --- a/.drone.env +++ b/.drone.env @@ -3,5 +3,5 @@ CORE_COMMITID=a11dbcf8ae3903c550bffea6bbfc7f587bede995 CORE_BRANCH=master # The test runner source for UI tests -WEB_COMMITID=eb00649279daab8442dd392bb34b85ab1e1d75ef +WEB_COMMITID=b747d299b66a2f9f11559c8c14ce3d6fd64a6135 WEB_BRANCH=master diff --git a/changelog/unreleased/update-web-5.5.0.md b/changelog/unreleased/update-web-5.5.0.md index 880e3bff20..714c3d1d75 100644 --- a/changelog/unreleased/update-web-5.5.0.md +++ b/changelog/unreleased/update-web-5.5.0.md @@ -1,10 +1,11 @@ -Enhancement: Update ownCloud Web to v5.5.0-rc.3 +Enhancement: Update ownCloud Web to v5.5.0-rc.4 Tags: web -We updated ownCloud Web to v5.5.0-rc.3. Please refer to the changelog (linked) for details on the web release. +We updated ownCloud Web to v5.5.0-rc.4. Please refer to the changelog (linked) for details on the web release. https://github.com/owncloud/web/pull/6854 https://github.com/owncloud/ocis/pull/3664 https://github.com/owncloud/ocis/pull/3680 -https://github.com/owncloud/web/releases/tag/v5.5.0-rc.3 +https://github.com/owncloud/ocis/pull/3727 +https://github.com/owncloud/web/releases/tag/v5.5.0-rc.4 diff --git a/extensions/web/Makefile b/extensions/web/Makefile index 433b09f1f8..7349794305 100644 --- a/extensions/web/Makefile +++ b/extensions/web/Makefile @@ -1,6 +1,6 @@ SHELL := bash NAME := web -WEB_ASSETS_VERSION = v5.5.0-rc.3 +WEB_ASSETS_VERSION = v5.5.0-rc.4 include ../../.make/recursion.mk diff --git a/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md b/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md index f0249bba61..d7654484a6 100644 --- a/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md @@ -77,12 +77,13 @@ Other free text and markdown formatting can be used elsewhere in the document if - [webUISharingPermissionsUsers/sharePermissionsUsers.feature:196](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature#L196) - [webUISharingPermissionsUsers/sharePermissionsUsers.feature:209](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature#L209) - [webUISharingPermissionsUsers/sharePermissionsUsers.feature:223](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature#L223) +- [webUIResharing2/reshareUsers.feature:41](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L41) +- [webUIResharing2/reshareUsers.feature:69](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L69) +- [webUIResharing2/reshareUsers.feature:70](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L70) - [webUIResharing2/reshareUsers.feature:95](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L95) - [webUIResharing2/reshareUsers.feature:96](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L96) - [webUIResharing2/reshareUsers.feature:130](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L130) - [webUIResharing2/reshareUsers.feature:131](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L131) -- [webUIResharing2/reshareUsers.feature:69](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L69) -- [webUIResharing2/reshareUsers.feature:70](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing2/reshareUsers.feature#L70) - [webUIResharing1/reshareUsers.feature:18](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L18) - [webUIResharing1/reshareUsers.feature:46](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L46) - [webUIResharing1/reshareUsers.feature:74](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L74) @@ -475,3 +476,11 @@ Other free text and markdown formatting can be used elsewhere in the document if - [webUIFilesDetails/fileDetails.feature:42](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesDetails/fileDetails.feature#42) - [webUIFilesDetails/fileDetails.feature:57](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesDetails/fileDetails.feature#57) - [webUIRenameFiles/renameFiles.feature:246](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#246) + +### [Copy/move not possible from and into shares in oCIS](https://github.com/owncloud/web/issues/6892) +- [webUIFilesCopy/copy.feature:89](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesCopy/copy.feature#L89) +- [webUIFilesCopy/copy.feature:101](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesCopy/copy.feature#L101) + +### [No share indicators inside share jail (needs concept / PM decision)](https://github.com/owncloud/web/issues/6894) +- [webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature:42](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature#L42) +- [webUISharingInternalUsersSharingIndicator/shareWithUsers.feature:80](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersSharingIndicator/shareWithUsers.feature#L80) From 031b326cc1a18be8e8e3497abdc51c5fabf07484 Mon Sep 17 00:00:00 2001 From: Pascal Wengerter Date: Fri, 6 May 2022 15:44:00 +0000 Subject: [PATCH 10/10] Automated changelog update [skip ci] --- CHANGELOG.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a17bbfde..567047c3c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ The following sections list the changes for unreleased. * Enhancement - Added `share_jail` and `projects` feature flags in spaces capability: [#3626](https://github.com/owncloud/ocis/pull/3626) * Enhancement - Update linkshare capabilities: [#3579](https://github.com/owncloud/ocis/pull/3579) * Enhancement - Update reva to v2.3.0: [#3552](https://github.com/owncloud/ocis/pull/3552) -* Enhancement - Update ownCloud Web to v5.5.0-rc.3: [#6854](https://github.com/owncloud/web/pull/6854) +* Enhancement - Update ownCloud Web to v5.5.0-rc.4: [#6854](https://github.com/owncloud/web/pull/6854) ## Details @@ -259,17 +259,18 @@ The following sections list the changes for unreleased. https://github.com/owncloud/ocis/pull/3652 https://github.com/owncloud/ocis/pull/3681 -* Enhancement - Update ownCloud Web to v5.5.0-rc.3: [#6854](https://github.com/owncloud/web/pull/6854) +* Enhancement - Update ownCloud Web to v5.5.0-rc.4: [#6854](https://github.com/owncloud/web/pull/6854) Tags: web - We updated ownCloud Web to v5.5.0-rc.3. Please refer to the changelog (linked) for details on + We updated ownCloud Web to v5.5.0-rc.4. Please refer to the changelog (linked) for details on the web release. https://github.com/owncloud/web/pull/6854 https://github.com/owncloud/ocis/pull/3664 https://github.com/owncloud/ocis/pull/3680 - https://github.com/owncloud/web/releases/tag/v5.5.0-rc.3 + https://github.com/owncloud/ocis/pull/3727 + https://github.com/owncloud/web/releases/tag/v5.5.0-rc.4 # Changelog for [1.20.0] (2022-04-13) The following sections list the changes for 1.20.0.