Merge pull request #3129 from owncloud/running-parallel-deploy-tests

[docs-only] Add doc on running parallel deployment tests locally
This commit is contained in:
Willy Kloucek authored and GitHub committed 2022-02-08 10:54:59 +01:00
commit 3dbcfc4cd6
10 files changed
+93 -2

No files matched your search

@@ -58,3 +58,8 @@ KEYCLOAK_ADMIN_PASSWORD=
# you need uncomment following line. Please see documentation at # you need uncomment following line. Please see documentation at
# https://owncloud.dev/ocis/deployment/monitoring-tracing/ # https://owncloud.dev/ocis/deployment/monitoring-tracing/
#COMPOSE_FILE=docker-compose.yml:monitoring_tracing/docker-compose-additions.yml #COMPOSE_FILE=docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
# If you want to use the testsuite with this stack,
# you need uncomment following line. Please see documentation at
# https://owncloud.dev/ocis/development/testing/
#COMPOSE_FILE=docker-compose.yml:testing/docker-compose-additions.yml
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# enable testing app
echo "Cloning and enabling testing app..."
git clone --depth 1 https://github.com/owncloud/testing.git /var/www/owncloud/apps/testing
occ app:enable testing
true
@@ -102,7 +102,7 @@ services:
STORAGE_USERS_DRIVER_OWNCLOUDSQL_REDIS_ADDR: redis:6379 # TODO: redis is not yet supported STORAGE_USERS_DRIVER_OWNCLOUDSQL_REDIS_ADDR: redis:6379 # TODO: redis is not yet supported
# ownCloudSQL sharing driver # ownCloudSQL sharing driver
STORAGE_SHARING_USER_DRIVER: oc10-sql STORAGE_SHARING_USER_DRIVER: oc10-sql
STORAGE_SHARING_USER_SQL_USERNAME: owncloud STORAGE_SHARING_USER_SQL_USERNAME: owncloud
STORAGE_SHARING_USER_SQL_PASSWORD: owncloud STORAGE_SHARING_USER_SQL_PASSWORD: owncloud
STORAGE_SHARING_USER_SQL_HOST: oc10-db STORAGE_SHARING_USER_SQL_HOST: oc10-db
STORAGE_SHARING_USER_SQL_PORT: 3306 STORAGE_SHARING_USER_SQL_PORT: 3306
@@ -123,6 +123,8 @@ services:
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please} OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
# INSECURE: needed if oCIS / Traefik is using self generated certificates # INSECURE: needed if oCIS / Traefik is using self generated certificates
OCIS_INSECURE: "${INSECURE:-false}" OCIS_INSECURE: "${INSECURE:-false}"
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
volumes: volumes:
- ./config/ocis/proxy.json:/etc/ocis/proxy.json - ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ocis-data:/var/lib/ocis - ocis-data:/var/lib/ocis
@@ -0,0 +1,17 @@
---
version: "3.7"
services:
ocis:
environment:
PROXY_ENABLE_BASIC_AUTH: "true"
oc10:
ports:
- 8080:8080
volumes:
- ./config/oc10/11-testing-app.sh:/etc/pre_server.d/11-testing-app.sh
openldap:
ports:
- 636:636
@@ -66,6 +66,8 @@ services:
SETTINGS_GRPC_ADDR: 0.0.0.0:9191 SETTINGS_GRPC_ADDR: 0.0.0.0:9191
# INSECURE: needed if oCIS / Traefik is using self generated certificates # INSECURE: needed if oCIS / Traefik is using self generated certificates
OCIS_INSECURE: "${INSECURE:-false}" OCIS_INSECURE: "${INSECURE:-false}"
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
volumes: volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh - ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json - ./config/ocis/web-config.dist.json:/config/web-config.dist.json
@@ -86,6 +86,8 @@ services:
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please} OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
# INSECURE: needed if oCIS / Traefik is using self generated certificates # INSECURE: needed if oCIS / Traefik is using self generated certificates
OCIS_INSECURE: "${INSECURE:-false}" OCIS_INSECURE: "${INSECURE:-false}"
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
volumes: volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh - ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json - ./config/ocis/web-config.dist.json:/config/web-config.dist.json
@@ -70,6 +70,8 @@ services:
STORAGE_USERS_DRIVER_S3NG_BUCKET: ${MINIO_BUCKET:-ocis-bucket} STORAGE_USERS_DRIVER_S3NG_BUCKET: ${MINIO_BUCKET:-ocis-bucket}
# INSECURE: needed if oCIS / Traefik is using self generated certificates # INSECURE: needed if oCIS / Traefik is using self generated certificates
OCIS_INSECURE: "${INSECURE:-false}" OCIS_INSECURE: "${INSECURE:-false}"
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
volumes: volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh - ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ocis-data:/var/lib/ocis - ocis-data:/var/lib/ocis
@@ -61,6 +61,8 @@ services:
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please} OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
# INSECURE: needed if oCIS / Traefik is using self generated certificates # INSECURE: needed if oCIS / Traefik is using self generated certificates
OCIS_INSECURE: "${INSECURE:-false}" OCIS_INSECURE: "${INSECURE:-false}"
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
volumes: volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh - ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ocis-data:/var/lib/ocis - ocis-data:/var/lib/ocis
@@ -54,7 +54,6 @@ services:
- /bin/sh - /bin/sh
- /entrypoint-override.sh - /entrypoint-override.sh
environment: environment:
PROXY_ENABLE_BASIC_AUTH: "true"
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test} OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
OCIS_DOMAIN: ${OCIS_DOMAIN:-ocis.owncloud.test} OCIS_DOMAIN: ${OCIS_DOMAIN:-ocis.owncloud.test}
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
@@ -70,6 +69,8 @@ services:
STORAGE_APP_REGISTRY_MIMETYPES_JSON: /var/tmp/ocis/app-config/mimetypes.json STORAGE_APP_REGISTRY_MIMETYPES_JSON: /var/tmp/ocis/app-config/mimetypes.json
# INSECURE: needed if oCIS / Traefik is using self generated certificates # INSECURE: needed if oCIS / Traefik is using self generated certificates
OCIS_INSECURE: "${INSECURE:-false}" OCIS_INSECURE: "${INSECURE:-false}"
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
volumes: volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh - ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ./config/ocis/mimetypes.json:/var/tmp/ocis/app-config/mimetypes.json - ./config/ocis/mimetypes.json:/var/tmp/ocis/app-config/mimetypes.json
+50
View File
@@ -166,3 +166,53 @@ If you want to work on a specific issue
5. go back to 2. and repeat till the tests are passing. 5. go back to 2. and repeat till the tests are passing.
6. remove those tests from the expected failures file 6. remove those tests from the expected failures file
7. make a PR that has the fixed code, and the relevant lines removed from the expected failures file. 7. make a PR that has the fixed code, and the relevant lines removed from the expected failures file.
## Running tests for parallel deployment
### Setup the parallel deployment environment
Instruction on setup is available [here](https://owncloud.dev/ocis/deployment/oc10_ocis_parallel/#local-setup)
Edit the `.env` file and uncomment this line:
```
COMPOSE_FILE=docker-compose.yml:testing/docker-compose-additions.yml
```
Start the docker stack with the following command:
```bash
docker-compose up -d
```
### Getting the test helpers
All the test helpers are located in the core repo.
```bash
git clone https://github.com/owncloud/core.git
```
### Run the acceptance tests
Run the acceptance tests with the following command from the root of the oCIS repository:
```bash
make test-paralleldeployment-api \
TEST_SERVER_URL="https://cloud.owncloud.test" \
TEST_OC10_URL="http://localhost:8080" \
TEST_PARALLEL_DEPLOYMENT=true \
TEST_OCIS=true \
TEST_WITH_LDAP=true \
PATH_TO_CORE="<path_to_core>" \
SKELETON_DIR="<path_to_core>/apps/testing/data/apiSkeleton"
```
Replace `<path_to_core>` with the actual path to the root directory of core repo that you have cloned earlier.
In order to run a single test, use `BEHAT_FEATURE` environment variable.
```bash
make test-paralleldeployment-api \
... \
BEHAT_FEATURE="tests/parallelDeployAcceptance/features/apiShareManagement/acceptShares.feature"
```