Skip to content

Commit

Permalink
mount /users instead of /oc, update readme
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Oct 5, 2021
1 parent 4b473fd commit 7fd7257
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 28 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<feature file> 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=<feature file>` 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
Expand Down
5 changes: 5 additions & 0 deletions changelog/unreleased/update-test-docs.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tests/oc-integration-tests/drone/frontend.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/<username> 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
Expand Down
2 changes: 1 addition & 1 deletion tests/oc-integration-tests/drone/gateway.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"

Expand Down
6 changes: 1 addition & 5 deletions tests/oc-integration-tests/drone/storage-home-ocis.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down
5 changes: 1 addition & 4 deletions tests/oc-integration-tests/drone/storage-home-s3ng.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion tests/oc-integration-tests/drone/storage-oc-ocis.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions tests/oc-integration-tests/drone/storage-oc-s3ng.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion tests/oc-integration-tests/local/frontend.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/oc-integration-tests/local/gateway.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"

Expand Down
7 changes: 2 additions & 5 deletions tests/oc-integration-tests/local/storage-home.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down

0 comments on commit 7fd7257

Please sign in to comment.