From abbcdafaff36a835101ea3afb5861094f2b7f8bd Mon Sep 17 00:00:00 2001 From: Artur Neumann Date: Thu, 22 Oct 2020 17:14:47 +0545 Subject: [PATCH] fix documentation because OCIS is now the default storage --- docs/extensions/storage/testing.md | 5 ++--- docs/ocis/development/testing.md | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/extensions/storage/testing.md b/docs/extensions/storage/testing.md index d4b5ccacb..f4e6de3d1 100644 --- a/docs/extensions/storage/testing.md +++ b/docs/extensions/storage/testing.md @@ -84,6 +84,7 @@ TEST_SERVER_URL=https://localhost:9200 \ TEST_EXTERNAL_USER_BACKENDS=true \ TEST_OCIS=true \ OCIS_REVA_DATA_ROOT=/var/tmp/ocis/owncloud/ \ +DELETE_USER_DATA_CMD='rm -rf /var/tmp/ocis/storage/users/nodes/root/* /var/tmp/ocis/storage/users/nodes/*-*-*-*' \ BEHAT_FILTER_TAGS='~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~@preview-extension-required' \ SKELETON_DIR=apps/testing/data/apiSkeleton ``` @@ -129,6 +130,7 @@ If you want to work on a specific issue TEST_EXTERNAL_USER_BACKENDS=true \ TEST_OCIS=true \ OCIS_REVA_DATA_ROOT=/var/tmp/ocis/owncloud/ \ + DELETE_USER_DATA_CMD='rm -rf /var/tmp/ocis/storage/users/nodes/root/* /var/tmp/ocis/storage/users/nodes/*-*-*-*' \ BEHAT_FEATURE='tests/acceptance/features/apiComments/comments.feature:123' ``` @@ -143,6 +145,3 @@ If you want to work on a specific issue If the changes also affect the `ocis` repository make sure the changes get ported over there. That will need the fixed code in `storage` to be applied to `ocis` along with the test-related changes. -### Notes -- in a normal case the test-code cleans up users after the test-run, but if a test-run is interrupted (e.g. by CTRL+C) users might have been left on the LDAP server. In that case rerunning the tests requires wiping the users in the ldap server, otherwise the tests will fail when trying to populate the users. This can be done by simply running `docker stop docker-slapd && docker rm docker-slapd` and [restarting the LDAP server container](#run-a-ldap-server-in-a-docker-container) -- the tests usually create users in the OU `TestUsers` with usernames specified in the feature file. If not defined in the feature file, most users have the password `123456`, defined by `regularUserPassword` in `behat.yml`, but other passwords are also used, see [`\FeatureContext::getPasswordForUser()`](https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/FeatureContext.php#L386) for mapping and [`\FeatureContext::__construct`](https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/FeatureContext.php#L1668) for the password definitions. diff --git a/docs/ocis/development/testing.md b/docs/ocis/development/testing.md index 1006aeaff..89889893b 100644 --- a/docs/ocis/development/testing.md +++ b/docs/ocis/development/testing.md @@ -47,6 +47,7 @@ TEST_SERVER_URL=https://localhost:9200 \ TEST_OCIS=true \ OCIS_REVA_DATA_ROOT=/var/tmp/ocis/owncloud/ \ SKELETON_DIR=apps/testing/data/apiSkeleton \ +DELETE_USER_DATA_CMD='rm -rf /var/tmp/ocis/storage/users/nodes/root/* /var/tmp/ocis/storage/users/nodes/*-*-*-*' \ BEHAT_FILTER_TAGS='~@notToImplementOnOCIS&&~@toImplementOnOCIS' ``` @@ -90,6 +91,7 @@ If you want to work on a specific issue TEST_SERVER_URL=https://localhost:9200 \ TEST_OCIS=true \ OCIS_REVA_DATA_ROOT=/var/tmp/ocis/owncloud/ \ + DELETE_USER_DATA_CMD='rm -rf /var/tmp/ocis/storage/users/nodes/root/* /var/tmp/ocis/storage/users/nodes/*-*-*-*' \ BEHAT_FEATURE='tests/acceptance/features/apiComments/comments.feature:123' ```