From 55df16c51a0237081701a476ceb4d0184c305191 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 +++++ .../fs/owncloudsql/owncloudsql_windows.go | 1 + .../decomposedfs/decomposedfs_windows.go | 1 + pkg/storage/utils/eosfs/eosfs_test.go | 1 + pkg/storage/utils/localfs/localfs_windows.go | 1 + .../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/ldap-users.toml | 6 ++--- .../local/storage-home.toml | 7 ++---- 16 files changed, 41 insertions(+), 31 deletions(-) create mode 100644 changelog/unreleased/update-test-docs.md diff --git a/README.md b/README.md index fb996bc515a..4fcc6330ff1 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 00000000000..ce3a6001320 --- /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/pkg/storage/fs/owncloudsql/owncloudsql_windows.go b/pkg/storage/fs/owncloudsql/owncloudsql_windows.go index 7d2d07b46f1..6abd8e10985 100644 --- a/pkg/storage/fs/owncloudsql/owncloudsql_windows.go +++ b/pkg/storage/fs/owncloudsql/owncloudsql_windows.go @@ -16,6 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +//go:build windows // +build windows package owncloudsql diff --git a/pkg/storage/utils/decomposedfs/decomposedfs_windows.go b/pkg/storage/utils/decomposedfs/decomposedfs_windows.go index 4431173404d..e4a6c18236d 100644 --- a/pkg/storage/utils/decomposedfs/decomposedfs_windows.go +++ b/pkg/storage/utils/decomposedfs/decomposedfs_windows.go @@ -16,6 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +//go:build windows // +build windows package decomposedfs diff --git a/pkg/storage/utils/eosfs/eosfs_test.go b/pkg/storage/utils/eosfs/eosfs_test.go index 72a9ad95ceb..6b433aaaf3f 100644 --- a/pkg/storage/utils/eosfs/eosfs_test.go +++ b/pkg/storage/utils/eosfs/eosfs_test.go @@ -16,6 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +//go:build eos // +build eos package eosfs diff --git a/pkg/storage/utils/localfs/localfs_windows.go b/pkg/storage/utils/localfs/localfs_windows.go index 7dcab15cc44..1cc33dd6c9d 100644 --- a/pkg/storage/utils/localfs/localfs_windows.go +++ b/pkg/storage/utils/localfs/localfs_windows.go @@ -16,6 +16,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. +//go:build windows // +build windows package localfs diff --git a/tests/oc-integration-tests/drone/frontend.toml b/tests/oc-integration-tests/drone/frontend.toml index bea95138ec3..13fbba77dcd 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 03b2514ba6b..916ad90e01a 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 d51c509af7a..661de2a4ea0 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 c1b1403c999..298775be93b 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 2813ec74ddf..b1ceacb68b3 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 1d0bb462aad..51c5edc2157 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 5c98ac3c224..7350e7b2a9e 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 ca66f9b744f..71289e93088 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/ldap-users.toml b/tests/oc-integration-tests/local/ldap-users.toml index d068a0eaca7..55c23e7abe0 100644 --- a/tests/oc-integration-tests/local/ldap-users.toml +++ b/tests/oc-integration-tests/local/ldap-users.toml @@ -12,7 +12,7 @@ auth_manager = "ldap" [grpc.services.authprovider.auth_managers.ldap] hostname="localhost" -port=636 +port=30636 insecure=true base_dn="dc=owncloud,dc=com" loginfilter="(&(objectclass=posixAccount)(|(cn={{login}}))(uid={{login}}))" @@ -30,7 +30,7 @@ driver = "ldap" [grpc.services.userprovider.drivers.ldap] hostname="localhost" -port=636 +port=30636 insecure=true base_dn="dc=owncloud,dc=com" userfilter="(&(objectclass=posixAccount)(|(uid={{.OpaqueId}})(cn={{.OpaqueId}})))" @@ -52,7 +52,7 @@ driver = "ldap" [grpc.services.groupprovider.drivers.ldap] hostname="localhost" -port=636 +port=30636 insecure=true base_dn="dc=owncloud,dc=com" groupfilter="(&(objectclass=posixGroup)(|(gid={{.OpaqueId}})(cn={{.OpaqueId}})))" diff --git a/tests/oc-integration-tests/local/storage-home.toml b/tests/oc-integration-tests/local/storage-home.toml index 60e5b15ccfa..394892536dc 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"