From 7fd7257212bd601ec2af18d809ca2ec72af9116d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 5 Oct 2021 14:54:59 +0200 Subject: [PATCH] mount /users instead of /oc, update readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- README.md | 22 ++++++++++++++----- changelog/unreleased/update-test-docs.md | 5 +++++ .../oc-integration-tests/drone/frontend.toml | 4 ++-- tests/oc-integration-tests/drone/gateway.toml | 2 +- .../drone/storage-home-ocis.toml | 6 +---- .../drone/storage-home-s3ng.toml | 5 +---- .../drone/storage-oc-ocis.toml | 3 ++- .../drone/storage-oc-s3ng.toml | 4 ++-- .../oc-integration-tests/local/frontend.toml | 2 +- tests/oc-integration-tests/local/gateway.toml | 2 +- .../local/storage-home.toml | 7 ++---- 11 files changed, 34 insertions(+), 28 deletions(-) create mode 100644 changelog/unreleased/update-test-docs.md diff --git a/README.md b/README.md index fb996bc515..4fcc6330ff 100644 --- a/README.md +++ b/README.md @@ -130,27 +130,37 @@ This will require some PHP-related tools to run, for instance on Ubuntu you will ``` 3. clone ownCloud 10 - `git clone https://github.com/owncloud/core.git ./testrunner` + ``` + git clone https://github.com/owncloud/core.git ./testrunner + ``` + +4. to run the correct version of the testsuite check out the commit id from the `.drone.env` file -4. clone the testing app - `git clone https://github.com/owncloud/testing.git ./testrunner/apps/testing` +5. clone the testing app + ``` + git clone https://github.com/owncloud/testing.git ./testrunner/apps/testing + ``` -5. run the tests +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='~@skipOnOcis&&~@skipOnOcis-OCIS-Storage&&~@notToImplementOnOCIS' \ + 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-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' + 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. ## Daily releases On every commit on the master branch (including merged Pull Requests) a new release will be created and diff --git a/changelog/unreleased/update-test-docs.md b/changelog/unreleased/update-test-docs.md new file mode 100644 index 0000000000..ce3a600132 --- /dev/null +++ b/changelog/unreleased/update-test-docs.md @@ -0,0 +1,5 @@ +Enhancement: align local tests with drone setup + +We fixed running the tests locally and align it with the drone setup. + +https://github.com/cs3org/reva/issues/2132 \ No newline at end of file diff --git a/tests/oc-integration-tests/drone/frontend.toml b/tests/oc-integration-tests/drone/frontend.toml index bea95138ec..13fbba77dc 100644 --- a/tests/oc-integration-tests/drone/frontend.toml +++ b/tests/oc-integration-tests/drone/frontend.toml @@ -37,7 +37,7 @@ chunk_folder = "/drone/src/tmp/reva/chunks" # While owncloud has only listed usernames at this endpoint CERN has # been exposing more than just usernames. For owncloud deployments we # can prefix the path to jail the requests to the correct CS3 namespace. -# In this deployment we mounted the owncloud storage provider at /oc. It +# In this deployment we mounted the owncloud storage provider at /users. It # expects a username as the first path segment. # currently, only the desktop client will use this endpoint, but only if # the dav.chunking capability is available @@ -47,7 +47,7 @@ chunk_folder = "/drone/src/tmp/reva/chunks" # for eos we need to rewrite the path # TODO strip the username from the path so the CS3 namespace can be mounted # at the files/ endpoint? what about migration? separate reva instance -files_namespace = "/oc" +files_namespace = "/users" # similar to the dav/files endpoint we can configure a prefix for the old webdav endpoint # we use the old webdav endpoint to present the cs3 namespace diff --git a/tests/oc-integration-tests/drone/gateway.toml b/tests/oc-integration-tests/drone/gateway.toml index 03b2514ba6..916ad90e01 100644 --- a/tests/oc-integration-tests/drone/gateway.toml +++ b/tests/oc-integration-tests/drone/gateway.toml @@ -67,7 +67,7 @@ home_provider = "/home" "/home" = {"address" = "localhost:12000"} # mount a storage provider without a path wrapper for direct access to users. -"/oc" = {"address" = "localhost:11000"} +"/users" = {"address" = "localhost:11000"} "123e4567-e89b-12d3-a456-426655440000" = {"address" = "localhost:11000"} # another mount point might be "/projects/" diff --git a/tests/oc-integration-tests/drone/storage-home-ocis.toml b/tests/oc-integration-tests/drone/storage-home-ocis.toml index d51c509af7..661de2a4ea 100644 --- a/tests/oc-integration-tests/drone/storage-home-ocis.toml +++ b/tests/oc-integration-tests/drone/storage-home-ocis.toml @@ -23,10 +23,6 @@ gatewaysvc = "localhost:19000" address = "0.0.0.0:12000" # This is a storage provider that grants direct access to the wrapped storage -# TODO same storage id as the /oc/ storage provider -# if we have an id, we can directly go to that storage, no need to wrap paths -# we have a locally running dataprovider -# this is where clients can find it # the context path wrapper reads tho username from the context and prefixes the relative storage path with it [grpc.services.storageprovider] driver = "ocis" @@ -42,7 +38,7 @@ enable_home = true treetime_accounting = true treesize_accounting = true - +# we have a locally running dataprovider [http] address = "0.0.0.0:12001" diff --git a/tests/oc-integration-tests/drone/storage-home-s3ng.toml b/tests/oc-integration-tests/drone/storage-home-s3ng.toml index c1b1403c99..298775be93 100644 --- a/tests/oc-integration-tests/drone/storage-home-s3ng.toml +++ b/tests/oc-integration-tests/drone/storage-home-s3ng.toml @@ -16,10 +16,6 @@ gatewaysvc = "localhost:19000" address = "0.0.0.0:12000" # This is a storage provider that grants direct access to the wrapped storage -# TODO same storage id as the /oc/ storage provider -# if we have an id, we can directly go to that storage, no need to wrap paths -# we have a locally running dataprovider -# this is where clients can find it # the context path wrapper reads tho username from the context and prefixes the relative storage path with it [grpc.services.storageprovider] driver = "s3ng" @@ -40,6 +36,7 @@ treesize_accounting = true "s3.access_key" = "test" "s3.secret_key" = "test" +# we have a locally running dataprovider [http] address = "0.0.0.0:12001" diff --git a/tests/oc-integration-tests/drone/storage-oc-ocis.toml b/tests/oc-integration-tests/drone/storage-oc-ocis.toml index 2813ec74dd..b1ceacb68b 100644 --- a/tests/oc-integration-tests/drone/storage-oc-ocis.toml +++ b/tests/oc-integration-tests/drone/storage-oc-ocis.toml @@ -15,7 +15,7 @@ address = "0.0.0.0:11000" # we have a locally running dataprovider [grpc.services.storageprovider] driver = "ocis" -mount_path = "/oc" +mount_path = "/users" mount_id = "123e4567-e89b-12d3-a456-426655440000" expose_data_server = true data_server_url = "http://revad-services:11001/data" @@ -26,6 +26,7 @@ treetime_accounting = true treesize_accounting = true userprovidersvc = "localhost:18000" +# we have a locally running dataprovider [http] address = "0.0.0.0:11001" diff --git a/tests/oc-integration-tests/drone/storage-oc-s3ng.toml b/tests/oc-integration-tests/drone/storage-oc-s3ng.toml index 1d0bb462aa..51c5edc215 100644 --- a/tests/oc-integration-tests/drone/storage-oc-s3ng.toml +++ b/tests/oc-integration-tests/drone/storage-oc-s3ng.toml @@ -12,10 +12,9 @@ gatewaysvc = "localhost:19000" address = "0.0.0.0:11000" # This is a storage provider that grants direct access to the wrapped storage -# we have a locally running dataprovider [grpc.services.storageprovider] driver = "s3ng" -mount_path = "/oc" +mount_path = "/users" mount_id = "123e4567-e89b-12d3-a456-426655440000" expose_data_server = true data_server_url = "http://revad-services:11001/data" @@ -31,6 +30,7 @@ userprovidersvc = "localhost:18000" "s3.access_key" = "test" "s3.secret_key" = "test" +# we have a locally running dataprovider [http] address = "0.0.0.0:11001" diff --git a/tests/oc-integration-tests/local/frontend.toml b/tests/oc-integration-tests/local/frontend.toml index 5c98ac3c22..7350e7b2a9 100644 --- a/tests/oc-integration-tests/local/frontend.toml +++ b/tests/oc-integration-tests/local/frontend.toml @@ -37,7 +37,7 @@ chunk_folder = "/var/tmp/reva/chunks" # While owncloud has only listed usernames at this endpoint CERN has # been exposing more than just usernames. For owncloud deployments we # can prefix the path to jail the requests to the correct CS3 namespace. -# In this deployment we mounted the owncloud storage provider at /oc. It +# In this deployment we mounted the owncloud storage provider at /users. It # expects a username as the first path segment. # currently, only the desktop client will use this endpoint, but only if # the dav.chunking capability is available diff --git a/tests/oc-integration-tests/local/gateway.toml b/tests/oc-integration-tests/local/gateway.toml index ca66f9b744..71289e9308 100644 --- a/tests/oc-integration-tests/local/gateway.toml +++ b/tests/oc-integration-tests/local/gateway.toml @@ -60,7 +60,7 @@ home_provider = "/home" "/home" = {"address" = "localhost:12000"} # mount a storage provider without a path wrapper for direct access to users. -"/oc" = {"address" = "localhost:11000"} +"/users" = {"address" = "localhost:11000"} "123e4567-e89b-12d3-a456-426655440000" = {"address" = "localhost:11000"} # another mount point might be "/projects/" diff --git a/tests/oc-integration-tests/local/storage-home.toml b/tests/oc-integration-tests/local/storage-home.toml index 60e5b15ccf..394892536d 100644 --- a/tests/oc-integration-tests/local/storage-home.toml +++ b/tests/oc-integration-tests/local/storage-home.toml @@ -16,11 +16,7 @@ gatewaysvc = "localhost:19000" address = "0.0.0.0:12000" # This is a storage provider that grants direct access to the wrapped storage -# TODO same storage id as the /oc/ storage provider -# if we have an id, we can directly go to that storage, no need to wrap paths -# we have a locally running dataprovider -# this is where clients can find it -# the context path wrapper reads tho username from the context and prefixes the relative storage path with it +# the context path wrapper reads the username from the context and prefixes the relative storage path with it [grpc.services.storageprovider] driver = "ocis" mount_path = "/home" @@ -39,6 +35,7 @@ treesize_accounting = true #owner = 95cb8724-03b2-11eb-a0a6-c33ef8ef53ad +# we have a locally running dataprovider [http] address = "0.0.0.0:12001"