From 72bd2b3d6c733ed730850398859b6441f9cfd56a Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Wed, 20 Nov 2024 15:41:26 +0545 Subject: [PATCH] docs: fix docs for running acceptance tests docs: add makefile docs: add README in acceptance level docs: update configs --- README.md | 103 +++++------------- tests/acceptance/Makefile | 83 ++++++++++++++ tests/acceptance/README.md | 100 +++++++++++++++++ .../oc-integration-tests/local/combined.toml | 6 +- .../local/gateway-virtual.toml | 2 +- tests/oc-integration-tests/local/gateway.toml | 2 +- .../local/ldap-users.toml | 6 +- tests/oc-integration-tests/local/ocmd.toml | 4 +- tests/oc-integration-tests/local/shares.toml | 2 +- .../local/storage-users-0-9.toml | 6 +- .../local/storage-users-a-f.toml | 6 +- .../local/storage-users-posixfs.toml | 69 ++++++++++++ .../local/storage-users-s3ng.toml | 61 +++++++++++ .../local/storage-users.toml | 6 +- .../local/users.demo.json | 12 ++ 15 files changed, 372 insertions(+), 96 deletions(-) create mode 100644 tests/acceptance/Makefile create mode 100644 tests/acceptance/README.md create mode 100644 tests/oc-integration-tests/local/storage-users-posixfs.toml create mode 100644 tests/oc-integration-tests/local/storage-users-s3ng.toml diff --git a/README.md b/README.md index bce5f4d9a9..ea47b534ac 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,41 @@ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![GoDoc](https://godoc.org/github.com/cs3org/reva?status.svg)](https://godoc.org/github.com/cs3org/reva) - [![Gitter chat](https://badges.gitter.im/cs3org/reva.svg)](https://gitter.im/cs3org/reva) [![Build Status](https://drone.cernbox.cern.ch/api/badges/cs3org/reva/status.svg)](https://drone.cernbox.cern.ch/cs3org/reva) - [![Go Report Card](https://goreportcard.com/badge/github.com/cs3org/reva)](https://goreportcard.com/report/github.com/cs3org/reva) [![codecov](https://codecov.io/gh/cs3org/reva/branch/master/graph/badge.svg)](https://codecov.io/gh/cs3org/reva) [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B11650%2Fcs3org%2Freva.svg?type=shield)](https://app.fossa.com/projects/custom%2B11650%2Fcs3org%2Freva?ref=badge_shield) +[![Gitter chat](https://badges.gitter.im/cs3org/reva.svg)](https://gitter.im/cs3org/reva) [![Build Status](https://drone.cernbox.cern.ch/api/badges/cs3org/reva/status.svg)](https://drone.cernbox.cern.ch/cs3org/reva) +[![Go Report Card](https://goreportcard.com/badge/github.com/cs3org/reva)](https://goreportcard.com/report/github.com/cs3org/reva) [![codecov](https://codecov.io/gh/cs3org/reva/branch/master/graph/badge.svg)](https://codecov.io/gh/cs3org/reva) [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B11650%2Fcs3org%2Freva.svg?type=shield)](https://app.fossa.com/projects/custom%2B11650%2Fcs3org%2Freva?ref=badge_shield) ================ - - - ![REVA Logo](https://raw.githubusercontent.com/cs3org/logos/efd3d2649478193e74f3de5a41247445941026b6/reva/logo.jpg) REVA is an interoperability platform. It connects storage, sync and share platforms and application providers, and it does it in a vendor and platform neutral way by using the [CS3 APIS](https://github.com/cs3org/cs3apis). ## Installation + Head to [Documentation](https://reva.link) for documentation or [download](https://github.com/cs3org/reva/releases) to get the latest available release. ## Documentation & Support -Read the [getting started guide](https://reva.link/docs/getting-started/) and the other feature guides. +Read the [getting started guide](https://reva.link/docs/getting-started/) and the other feature guides. ## Build and run it yourself -You need to have [Go](https://golang.org/doc/install) (version 1.16 or higher), [git](https://git-scm.com/) and [make](https://en.wikipedia.org/wiki/Make_(software)) installed. Some of these commands may require `sudo`, depending on your system setup. + +You need to have [Go](https://golang.org/doc/install) (version 1.16 or higher), [git](https://git-scm.com/) and [make]() installed. Some of these commands may require `sudo`, depending on your system setup. + +#### Build ``` -$ git clone https://github.com/cs3org/reva +$ git clone -b edge https://github.com/cs3org/reva $ cd reva -$ make deps $ make build +``` + +#### Run + +``` $ mkdir -p /etc/revad $ cp examples/storage-references/users.demo.json /etc/revad/users.json $ cp examples/storage-references/groups.demo.json /etc/revad/groups.json $ cp examples/storage-references/providers.demo.json /etc/revad/ocm-providers.json $ cmd/revad/revad -dev-dir examples/storage-references + ``` You can also read the [build from sources guide](https://reva.link/docs/getting-started/build-reva/) and the [setup tutorial](https://github.com/cs3org/reva/blob/master/docs/content/en/docs/tutorials/setup-tutorial.md). @@ -55,12 +61,14 @@ To run all of them you can do `make test`. If you see `TestGetManagerWithInvalidUser/Nil_in_user` fail, [try removing](https://github.com/cs3org/reva/issues/1736) `/etc/revad/users.json` on your system. To run a single one of them you can do: + ```sh $ go test `go list ./pkg/utils/...` ok github.com/cs3org/reva/v2/pkg/utils 0.374s ``` ### Integration tests (GRPC) + See [tests/integration](https://github.com/cs3org/reva/tree/master/tests/integration). This requires Redis. @@ -74,9 +82,11 @@ You can get more verbose output with `ginkgo -v -r tests/integration/`. NB: This will work better on Linux than on MacOS because of issues with static linking (`library not found for -lcrt0.o`). ### Litmus tests (WebDAV) + [Litmus](http://www.webdav.org/neon/litmus/) is a webdav test suite. The litmus tests for Reva's WebDAV interface are run using the [ownCloud's litmus Docker image](https://github.com/owncloud-docker/litmus). The '-old' and '-new' refer to which `LITMUS_URL` environment variable is passed to that Docker image, in other words, which path on the Reva server the litmus tests are run against. 1. start the needed services + ``` mkdir -p /var/tmp/reva/einstein cd tests/oc-integration-tests/local @@ -88,6 +98,7 @@ NB: This will work better on Linux than on MacOS because of issues with static l ``` 2. run litmus tests: + ``` docker run --rm --network=host\ -e LITMUS_URL=http://localhost:20080/remote.php/webdav \ @@ -101,72 +112,12 @@ NB: This will work better on Linux than on MacOS because of issues with static l - if on MacOS you see `FAIL (connection refused by '127.0.0.1' port 20080: Connection refused)`, it may be necessary to replace 'localhost' with your host IP address (e.g. `ipconfig getifaddr en0` or `sudo ifconfig | grep 192`) ### Acceptance tests (ownCloud legacy) -See [tests/acceptance](https://github.com/cs3org/reva/tree/master/tests/acceptance). - -This will require some PHP-related tools to run, for instance on Ubuntu you will need `apt install -y php-xml php-curl composer`. - -1. start an LDAP server - ``` - docker run --rm --hostname ldap.my-company.com \ - -e LDAP_TLS_VERIFY_CLIENT=never \ - -e LDAP_DOMAIN=owncloud.com \ - -e LDAP_ORGANISATION=ownCloud \ - -e LDAP_ADMIN_PASSWORD=admin \ - --name docker-slapd \ - -p 127.0.0.1:389:389 \ - -p 636:636 -d osixia/openldap:1.3.0 - ``` - -2. start the needed services - ``` - cd tests/oc-integration-tests/local - ../../../cmd/revad/revad -c frontend.toml & - ../../../cmd/revad/revad -c gateway.toml & - ../../../cmd/revad/revad -c shares.toml & - ../../../cmd/revad/revad -c storage-shares.toml & - ../../../cmd/revad/revad -c storage-home.toml & - ../../../cmd/revad/revad -c storage-users.toml & - ../../../cmd/revad/revad -c storage-publiclink.toml & - ../../../cmd/revad/revad -c machine-auth.toml & - ../../../cmd/revad/revad -c permissions-ocis-ci.toml & - ../../../cmd/revad/revad -c ldap-users.toml - ``` - -3. clone ownCloud Infinite Scale `OCIS` - ``` - git clone https://github.com/owncloud/ocis.git ./testrunner - ``` - -4. to run the correct version of the testsuite check out the commit id from the `.drone.env` file - -5. clone the testing app - ``` - git clone https://github.com/owncloud/testing.git ./testrunner/apps/testing - ``` - -6. run the tests - ``` - cd testrunner - TEST_SERVER_URL='http://localhost:20080' \ - OCIS_REVA_DATA_ROOT='/var/tmp/reva/' \ - DELETE_USER_DATA_CMD="rm -rf /var/tmp/reva/data/nodes/root/* /var/tmp/reva/data/nodes/*-*-*-* /var/tmp/reva/data/blobs/*" \ - SKELETON_DIR='./apps/testing/data/apiSkeleton' \ - TEST_WITH_LDAP='true' \ - REVA_LDAP_HOSTNAME='localhost' \ - TEST_REVA='true' \ - BEHAT_FILTER_TAGS='~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@provisioning_api-app-required&&~@preview-extension-required&&~@local_storage&&~@skipOnOcis-OCIS-Storage&&~@skipOnOcis' \ - EXPECTED_FAILURES_FILE=../reva/tests/acceptance/expected-failures-on-OCIS-storage.md \ - make test-acceptance-from-core-api - ``` - - This will run all tests that are relevant to reva. - - To run a single test add `BEHAT_FEATURE=` and specify the path to the feature file and an optional line number. For example: `BEHAT_FEATURE='tests/acceptance/features/apiWebdavUpload1/uploadFile.feature:12'` - - Make sure to double check the paths if you are changing the `OCIS_REVA_DATA_ROOT`. The `DELETE_USER_DATA_CMD` needs to clean up the correct folders. + +See [Running Acceptance Tests](https://github.com/cs3org/reva/tree/edge/tests/acceptance). ## Daily releases -On every commit on the master branch (including merged Pull Requests) a new release will be created and + +On every commit on the master branch (including merged Pull Requests) a new release will be created and available at [daily releases](https://reva-releases.web.cern.ch/reva-releases). ## Major versions @@ -175,11 +126,11 @@ There are currently two major versions in active development. ### 1.x versions -The ``master`` branch is the stable development branch. Releases from master are tagged as 1.x.x versions following [semver](https://semver.org/). +The `master` branch is the stable development branch. Releases from master are tagged as 1.x.x versions following [semver](https://semver.org/). ### 2.x versions -The ``edge`` branch is used to develop the next version of this project. The edge branch is based on a new concept named "Spaces" and a new set of the CS3APIs are being implemented, making it **not compatible** with `master` branch. Releases from `edge` are tagged as *2.x.x* versions following [semver](https://semver.org/). +The `edge` branch is used to develop the next version of this project. The edge branch is based on a new concept named "Spaces" and a new set of the CS3APIs are being implemented, making it **not compatible** with `master` branch. Releases from `edge` are tagged as _2.x.x_ versions following [semver](https://semver.org/). ## Run it using Docker @@ -203,8 +154,8 @@ portability of the applications and service extensions. REVA is distributed under [Apache 2.0 license](https://github.com/cs3org/reva/blob/master/LICENSE). ## Logo -REVA logo's have been designed and contributed to the project by Eamon Maguire. +REVA logo's have been designed and contributed to the project by Eamon Maguire. ## Disclaimer diff --git a/tests/acceptance/Makefile b/tests/acceptance/Makefile new file mode 100644 index 0000000000..bd99ce8930 --- /dev/null +++ b/tests/acceptance/Makefile @@ -0,0 +1,83 @@ +.PHONY: help +help: + @echo "Usage: make [target]" + @echo "Available targets:" + @echo " reva Start reva with ocis storage" + @echo " reva-posix Start reva with posixfs storage" + @echo " reva-s3ng Start reva with s3ng storage" + +CURR_DIR:=$(dir $(abspath $(firstword $(MAKEFILE_LIST)))) +REVA_CMD:=$(abspath $(CURR_DIR)/../../cmd/revad/revad) +CONFIG_DIR:=$(abspath $(CURR_DIR)/../oc-integration-tests/local) + +.PHONY: ldap +ldap: + @docker run --rm -d \ + --name docker-slapd \ + -e LDAP_TLS_VERIFY_CLIENT=never \ + -e LDAP_DOMAIN=owncloud.com \ + -e LDAP_ORGANISATION=ownCloud \ + -e LDAP_ADMIN_PASSWORD=admin \ + -p 389:389 \ + -p 636:636 \ + osixia/openldap:1.3.0 + +.PHONY: redis +redis: + @docker run --rm -d \ + --name redis \ + -e REDIS_DATABASES=1 \ + -p 6379:6379 \ + redis:6-alpine + +.PHONY: ceph +ceph: + @docker run --rm -d \ + --name ceph \ + -e CEPH_DAEMON=demo \ + -e NETWORK_AUTO_DETECT=1 \ + -e MON_IP=0.0.0.0 \ + -e CEPH_PUBLIC_NETWORK=0.0.0.0/0 \ + -e RGW_NAME=localhost \ + -e CEPH_DEMO_UID=test-user \ + -e CEPH_DEMO_ACCESS_KEY=testadmin \ + -e CEPH_DEMO_SECRET_KEY=testadmin \ + -e CEPH_DEMO_BUCKET=test \ + -p 8080:8080 \ + ceph/daemon + @echo "Waiting for ceph to be ready..." + @while [ `curl -s http://localhost:8080 -w %{http_code} -o /dev/null` -ne 200 ]; do sleep 1; done + +.PHONY: reva-services +reva-services: + @$(REVA_CMD) -c $(CONFIG_DIR)/frontend.toml & + @$(REVA_CMD) -c $(CONFIG_DIR)/gateway.toml & + @$(REVA_CMD) -c $(CONFIG_DIR)/shares.toml & + @$(REVA_CMD) -c $(CONFIG_DIR)/storage-shares.toml & + @$(REVA_CMD) -c $(CONFIG_DIR)/storage-publiclink.toml & + @$(REVA_CMD) -c $(CONFIG_DIR)/machine-auth.toml & + @$(REVA_CMD) -c $(CONFIG_DIR)/permissions-ocis-ci.toml & + @$(REVA_CMD) -c $(CONFIG_DIR)/ldap-users.toml & + +.PHONY: reva +reva: ldap reva-services + @echo "Running reva with ocis storage" + @$(REVA_CMD) -c $(CONFIG_DIR)/storage-users.toml + +.PHONY: reva-posix +reva-posix: ldap redis reva-services + @echo "Running reva with posixfs storage" + @$(REVA_CMD) -c $(CONFIG_DIR)/storage-users-posixfs.toml + +.PHONY: reva-s3ng +reva-s3ng: ldap ceph reva-services + @echo "Running reva with posixfs storage" + @$(REVA_CMD) -c $(CONFIG_DIR)/storage-users-s3ng.toml + +.PHONY: clean +clean: + @docker ps -q --filter "name=docker-slapd" | xargs -r docker stop + @docker ps -q --filter "name=redis" | xargs -r docker stop + @docker ps -q --filter "name=ceph" | xargs -r docker stop + @pkill revad || true + @rm -rf /tmp/reva diff --git a/tests/acceptance/README.md b/tests/acceptance/README.md new file mode 100644 index 0000000000..4af5f3eac2 --- /dev/null +++ b/tests/acceptance/README.md @@ -0,0 +1,100 @@ +## Acceptance Tests (ownCloud Legacy) + +This will require some PHP-related tools to run, for instance on Ubuntu you will need `apt install -y php-xml php-curl composer`. + +1. [Build reva](https://github.com/cs3org/reva/tree/edge?tab=readme-ov-file#build) + +2. Start the reva server (with ocis storage driver) + + ```bash + make reva + ``` + + > **INFO:** + > + > You can run the reva with other storage drivers. + > + > To run reva with `posix` storage driver: + > + > ```bash + > make reva-posix + > ``` + > + > To run reva with `s3ng` storage driver: + > + > ```bash + > make reva-s3ng + > ``` + +3. Get ownCloud Infinite Scale `OCIS` + + ```bash + git clone https://github.com/owncloud/ocis.git ./testrunner + ``` + +4. To run the correct version of the testsuite check out the commit id from the `.drone.env` file + + ```bash + cd testrunner + git checkout + ``` + +5. Run the tests + + ```bash + TEST_SERVER_URL='http://localhost:20080' \ + TEST_REVA='true' \ + TEST_WITH_LDAP='true' \ + OCIS_REVA_DATA_ROOT='/tmp/reva/' \ + DELETE_USER_DATA_CMD="rm -rf /tmp/reva/data/nodes/root/* /tmp/reva/data/nodes/*-*-*-* /tmp/reva/data/blobs/*" \ + SKELETON_DIR='./apps/testing/data/apiSkeleton' \ + REVA_LDAP_HOSTNAME='localhost' \ + BEHAT_FILTER_TAGS='~@skip&&~@skipOnReva' \ + EXPECTED_FAILURES_FILE=/tests/acceptance/expected-failures-on-OCIS-storage.md \ + DIVIDE_INTO_NUM_PARTS=1 \ + RUN_PART=1 \ + ACCEPTANCE_TEST_TYPE=core-api \ + make test-acceptance-api + ``` + + This will run all tests that are relevant to reva. + + To run a single test add `BEHAT_FEATURE=` and specify the path to the feature file and an optional line number. + For example: + + ```bash + ... + BEHAT_FEATURE='tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature:20' \ + make test-acceptance-api + ``` + + **NOTE:** + Make sure to double check the paths if you are changing the `OCIS_REVA_DATA_ROOT`. The `DELETE_USER_DATA_CMD` needs to clean up the correct folders. + + > **INFO:** + > + > Use these proper environment variables to run tests with different storage drivers: + > + > 1. Run tests with `s3ng` storage driver: + > + > ```bash + > ... + > DELETE_USER_DATA_CMD="rm -rf /tmp/reva/data/spaces/* /tmp/reva/data/blobs/* /tmp/reva/data/indexes/by-type/*" \ + > EXPECTED_FAILURES_FILE=/tests/acceptance/expected-failures-on-S3NG-storage.md \ + > make test-acceptance-api + > ``` + > + > 2. Run tests with `posix` storage driver: + > + > ```bash + > ... + > DELETE_USER_DATA_CMD="bash -cx 'rm -rf /tmp/reva/data/users/* /tmp/reva/data/indexes/by-type/*'" \ + > EXPECTED_FAILURES_FILE=/tests/acceptance/expected-failures-on-POSIX-storage.md \ + > make test-acceptance-api + > ``` + +6. Cleanup the setup + + ```bash + make clean + ``` diff --git a/tests/oc-integration-tests/local/combined.toml b/tests/oc-integration-tests/local/combined.toml index 264c74bb32..8c7fdeac12 100644 --- a/tests/oc-integration-tests/local/combined.toml +++ b/tests/oc-integration-tests/local/combined.toml @@ -73,7 +73,7 @@ users = "users.demo.json" #expose_data_server = true #[grpc.services.storageprovider.drivers.ocis] -#root = "/var/tmp/reva/data" +#root = "/tmp/reva/data" #enable_home = false #treetime_accounting = true #treesize_accounting = true @@ -186,9 +186,9 @@ max_chunk_size = 0 [http.services.dataprovider] driver = "ocis" -temp_folder = "/var/tmp/reva/tmp" +temp_folder = "/tmp/reva/tmp" [http.services.dataprovider.drivers.ocis] -root = "/var/tmp/reva/data" +root = "/tmp/reva/data" treetime_accounting = true treesize_accounting = true diff --git a/tests/oc-integration-tests/local/gateway-virtual.toml b/tests/oc-integration-tests/local/gateway-virtual.toml index 42b10d29b4..8a76127daf 100644 --- a/tests/oc-integration-tests/local/gateway-virtual.toml +++ b/tests/oc-integration-tests/local/gateway-virtual.toml @@ -44,7 +44,7 @@ datagateway = "http://localhost:19001/data" transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads transfer_expires = 6 # give it a moment #disable_home_creation_on_login = true -link_grants_file = "/var/tmp/reva/link_grants_file.json" +link_grants_file = "/tmp/reva/link_grants_file.json" [grpc.services.authregistry] diff --git a/tests/oc-integration-tests/local/gateway.toml b/tests/oc-integration-tests/local/gateway.toml index 91a28141ac..520e5951c7 100644 --- a/tests/oc-integration-tests/local/gateway.toml +++ b/tests/oc-integration-tests/local/gateway.toml @@ -49,7 +49,7 @@ datagateway = "http://localhost:19001/data" transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads transfer_expires = 6 # give it a moment #disable_home_creation_on_login = true -link_grants_file = "/var/tmp/reva/link_grants_file.json" +link_grants_file = "/tmp/reva/link_grants_file.json" create_home_cache_ttl = 10 diff --git a/tests/oc-integration-tests/local/ldap-users.toml b/tests/oc-integration-tests/local/ldap-users.toml index a0f344b071..f0552740ac 100644 --- a/tests/oc-integration-tests/local/ldap-users.toml +++ b/tests/oc-integration-tests/local/ldap-users.toml @@ -22,7 +22,7 @@ enabled = true auth_manager = "ldap" [grpc.services.authprovider.auth_managers.ldap] -uri="ldaps://openldap:636" +uri="ldaps://localhost:636" insecure=true user_base_dn="ou=testusers,dc=owncloud,dc=com" user_filter="" @@ -41,7 +41,7 @@ userName="cn" driver = "ldap" [grpc.services.userprovider.drivers.ldap] -uri="ldaps://openldap:636" +uri="ldaps://localhost:636" insecure=true user_base_dn="ou=testusers,dc=owncloud,dc=com" group_base_dn="ou=testgroups,dc=owncloud,dc=com" @@ -68,7 +68,7 @@ member="memberUID" driver = "ldap" [grpc.services.groupprovider.drivers.ldap] -uri="ldaps://openldap:636" +uri="ldaps://localhost:636" insecure=true user_base_dn="ou=testusers,dc=owncloud,dc=com" group_base_dn="ou=testgroups,dc=owncloud,dc=com" diff --git a/tests/oc-integration-tests/local/ocmd.toml b/tests/oc-integration-tests/local/ocmd.toml index def07227a6..954c43f441 100644 --- a/tests/oc-integration-tests/local/ocmd.toml +++ b/tests/oc-integration-tests/local/ocmd.toml @@ -19,7 +19,7 @@ driver = "json" # Note that ocmcore and ocmshareprovider should use the same file for storing the shares. [grpc.services.ocmcore.drivers.json] -file = "/var/tmp/reva/shares_server_1.json" +file = "/tmp/reva/shares_server_1.json" [grpc.services.ocminvitemanager] driver = "json" @@ -28,7 +28,7 @@ driver = "json" driver = "json" [grpc.services.ocmshareprovider.drivers.json] -file = "/var/tmp/reva/shares_server_1.json" +file = "/tmp/reva/shares_server_1.json" [grpc.services.ocmproviderauthorizer] driver = "json" diff --git a/tests/oc-integration-tests/local/shares.toml b/tests/oc-integration-tests/local/shares.toml index 66a8fde7f2..8b61d875c9 100644 --- a/tests/oc-integration-tests/local/shares.toml +++ b/tests/oc-integration-tests/local/shares.toml @@ -27,5 +27,5 @@ auth_manager = "publicshares" gateway_addr = "0.0.0.0:19000" [grpc.services.publicshareprovider.drivers.json] -file = "/var/tmp/reva/publicshares.json" +file = "/tmp/reva/publicshares.json" gateway_addr = "0.0.0.0:19000" diff --git a/tests/oc-integration-tests/local/storage-users-0-9.toml b/tests/oc-integration-tests/local/storage-users-0-9.toml index 0549e10ba0..5a122eddda 100644 --- a/tests/oc-integration-tests/local/storage-users-0-9.toml +++ b/tests/oc-integration-tests/local/storage-users-0-9.toml @@ -26,7 +26,7 @@ expose_data_server = true data_server_url = "http://localhost:11001/data" [grpc.services.storageprovider.drivers.ocis] -root = "/var/tmp/reva/data-0-9" +root = "/tmp/reva/data-0-9" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" @@ -37,10 +37,10 @@ address = "0.0.0.0:11001" [http.services.dataprovider] driver = "ocis" -temp_folder = "/var/tmp/reva/tmp" +temp_folder = "/tmp/reva/tmp" [http.services.dataprovider.drivers.ocis] -root = "/var/tmp/reva/data-0-9" +root = "/tmp/reva/data-0-9" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" diff --git a/tests/oc-integration-tests/local/storage-users-a-f.toml b/tests/oc-integration-tests/local/storage-users-a-f.toml index 50014235f3..fb42f75d85 100644 --- a/tests/oc-integration-tests/local/storage-users-a-f.toml +++ b/tests/oc-integration-tests/local/storage-users-a-f.toml @@ -26,7 +26,7 @@ expose_data_server = true data_server_url = "http://localhost:11011/data" [grpc.services.storageprovider.drivers.ocis] -root = "/var/tmp/reva/data-a-f" +root = "/tmp/reva/data-a-f" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" @@ -37,10 +37,10 @@ address = "0.0.0.0:11011" [http.services.dataprovider] driver = "ocis" -temp_folder = "/var/tmp/reva/tmp" +temp_folder = "/tmp/reva/tmp" [http.services.dataprovider.drivers.ocis] -root = "/var/tmp/reva/data-a-f" +root = "/tmp/reva/data-a-f" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" diff --git a/tests/oc-integration-tests/local/storage-users-posixfs.toml b/tests/oc-integration-tests/local/storage-users-posixfs.toml new file mode 100644 index 0000000000..02870c9138 --- /dev/null +++ b/tests/oc-integration-tests/local/storage-users-posixfs.toml @@ -0,0 +1,69 @@ +# This config file will start a reva service that: +# - uses the posix driver to serve users (/users) +# - serves the storage provider on grpc port 11000 +# - serves http dataprovider for this storage on port 11001 +# - /data - dataprovider: file up and download + +[shared] +jwt_secret = "Pive-Fumkiu4" +gatewaysvc = "localhost:19000" + +[shared.grpc_client_options] +tls_mode = "insecure" + +[log] +#level = "warn" +#mode = "json" + +[grpc] +address = "0.0.0.0:11000" + +[grpc.tls_settings] +enabled = true + +# This is a storage provider that grants direct access to the wrapped storage +[grpc.services.storageprovider] +driver = "posix" +expose_data_server = true +data_server_url = "http://localhost:11001/data" +#gateway_addr = "0.0.0.0:19000" +mount_id = "1284d238-aa92-42ce-bdc4-0b0000009157" + +[grpc.services.storageprovider.drivers.posix] +root = "/tmp/reva/data" +treetime_accounting = true +treesize_accounting = true +permissionssvc = "localhost:10000" +personalspacepath_template = "users/{{.User.Id.OpaqueId}}" +generalspacepath_template = "projects/{{.SpaceId}}" +watch_fs = true + +[grpc.services.storageprovider.drivers.posix.filemetadatacache] +cache_store = "noop" + +[grpc.services.storageprovider.drivers.posix.idcache] +cache_store = "redis" +cache_nodes = [ "redis://localhost:6379" ] + + +# we have a locally running dataprovider +[http] +address = "0.0.0.0:11001" + +[http.services.dataprovider] +driver = "posix" +temp_folder = "/tmp/reva/tmp" + +[http.services.dataprovider.drivers.posix] +root = "/tmp/reva/data" +treetime_accounting = true +treesize_accounting = true +permissionssvc = "localhost:10000" +scan_debounce_delay = 0 + +[http.services.dataprovider.drivers.posix.idcache] +cache_store = "redis" +cache_nodes = [ "redis://localhost:6379" ] + +[http.services.dataprovider.drivers.posix.filemetadatacache] +cache_store = "noop" \ No newline at end of file diff --git a/tests/oc-integration-tests/local/storage-users-s3ng.toml b/tests/oc-integration-tests/local/storage-users-s3ng.toml new file mode 100644 index 0000000000..9617fbff69 --- /dev/null +++ b/tests/oc-integration-tests/local/storage-users-s3ng.toml @@ -0,0 +1,61 @@ +# This config file will start a reva service that: +# - uses the s3ng driver to serve users (/users) +# - serves the storage provider on grpc port 11000 +# - serves http dataprovider for this storage on port 11001 +# - /data - dataprovider: file up and download + +[shared] +jwt_secret = "Pive-Fumkiu4" +gatewaysvc = "localhost:19000" + +[shared.grpc_client_options] +tls_mode = "insecure" + +[log] +#level = "warn" +#mode = "json" + +[grpc] +address = "0.0.0.0:11000" + +[grpc.tls_settings] +enabled = true + +# This is a storage provider that grants direct access to the wrapped storage +[grpc.services.storageprovider] +driver = "s3ng" +expose_data_server = true +data_server_url = "http://localhost:11001/data" +mount_id = "1284d238-aa92-42ce-bdc4-0b0000009157" + +[grpc.services.storageprovider.drivers.s3ng] +root = "/tmp/reva/data" +treetime_accounting = true +treesize_accounting = true +permissionssvc = "localhost:10000" +"s3.endpoint" = "http://localhost:8080" +"s3.region" = "default" +"s3.bucket" = "test" +"s3.access_key" = "testadmin" +"s3.secret_key" = "testadmin" +"metadata_backend" = "xattrs" + +# we have a locally running dataprovider +[http] +address = "0.0.0.0:11001" + +[http.services.dataprovider] +driver = "s3ng" +temp_folder = "/tmp/reva/tmp" + +[http.services.dataprovider.drivers.s3ng] +root = "/tmp/reva/data" +treetime_accounting = true +treesize_accounting = true +permissionssvc = "localhost:10000" +"s3.endpoint" = "http://localhost:8080" +"s3.region" = "default" +"s3.bucket" = "test" +"s3.access_key" = "testadmin" +"s3.secret_key" = "testadmin" +"metadata_backend" = "xattrs" diff --git a/tests/oc-integration-tests/local/storage-users.toml b/tests/oc-integration-tests/local/storage-users.toml index 36f8d02a99..dd28014551 100644 --- a/tests/oc-integration-tests/local/storage-users.toml +++ b/tests/oc-integration-tests/local/storage-users.toml @@ -30,7 +30,7 @@ data_server_url = "http://localhost:11001/data" mount_id = "1284d238-aa92-42ce-bdc4-0b0000009157" [grpc.services.storageprovider.drivers.ocis] -root = "/var/tmp/reva/data" +root = "/tmp/reva/data" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" @@ -43,10 +43,10 @@ address = "0.0.0.0:11001" [http.services.dataprovider] driver = "ocis" -temp_folder = "/var/tmp/reva/tmp" +temp_folder = "/tmp/reva/tmp" [http.services.dataprovider.drivers.ocis] -root = "/var/tmp/reva/data" +root = "/tmp/reva/data" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" diff --git a/tests/oc-integration-tests/local/users.demo.json b/tests/oc-integration-tests/local/users.demo.json index 893d69b99f..acf57647b3 100644 --- a/tests/oc-integration-tests/local/users.demo.json +++ b/tests/oc-integration-tests/local/users.demo.json @@ -1,4 +1,16 @@ [ + { + "id": { + "opaque_id": "ddc2004c-0977-11eb-9d3f-a793888cd0f8", + "idp": "http://localhost:20080", + "type": 1 + }, + "username": "admin", + "secret": "admin", + "mail": "admin@example.org", + "display_name": "Admin", + "groups": ["sailing-lovers", "radium-lovers", "polonium-lovers", "physics-lovers", "quantum-lovers"] + }, { "id": { "opaque_id": "4c510ada-c86b-4815-8820-42cdf82c3d51",