[docs-only] Document running tests using ociswrapper (#6283)

* add README for ociswrapper

* add doc on how to tests env config test suites with ociswrapper

* document running tests using ociswrapper

* update local docker compose setup for running tests

* make ocis able to run with ociswrapper

* update wrapper doc

* run with ociswrapper by default

* ignore md files on codacy

* fix README format
This commit is contained in:
Sawjan Gurung
2023-05-16 14:39:17 +05:45
committed by GitHub
parent 2c2d8fae44
commit 60fd953c7e
7 changed files with 153 additions and 18 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
services:
acceptance-tests:
image: owncloudci/php:7.4
working_dir: /drone/src
command: /bin/bash /test/run-tests.sh
environment:
OCIS_ROOT: /drone/src
@@ -8,7 +9,7 @@ services:
RUN_ON_OCIS: "true"
TEST_SERVER_URL: https://ocis-server:9200
TEST_WITH_GRAPH_API: "true"
OCIS_WRAPPER_URL: http://ocis-server:5000
STORAGE_DRIVER: $STORAGE_DRIVER
TEST_SOURCE: $TEST_SOURCE
BEHAT_SUITE: ${BEHAT_SUITE:-}
+10 -14
View File
@@ -1,8 +1,13 @@
services:
ocis-server:
image: owncloud/ocis:$OCIS_IMAGE_TAG
build:
dockerfile: ocis.Dockerfile
context: ./
args:
OCIS_IMAGE_TAG: $OCIS_IMAGE_TAG
user: root
environment:
WITH_WRAPPER: $WITH_WRAPPER
OCIS_URL: "https://ocis-server:9200"
STORAGE_USERS_DRIVER: $STORAGE_DRIVER
STORAGE_USERS_DRIVER_LOCAL_ROOT: /srv/app/tmp/ocis/local/root
@@ -14,14 +19,9 @@ services:
WEB_UI_CONFIG: /drone/src/tests/config/drone/ocis-config.json
ACCOUNTS_HASH_DIFFICULTY: 4
OCIS_INSECURE: "true"
"IDM_CREATE_DEMO_USERS": "true"
"IDM_ADMIN_PASSWORD": "admin"
"FRONTEND_SEARCH_MIN_LENGTH": "2"
"OCIS_CORS_ALLOW_ORIGINS": "https://aphno.badal"
"POSTPROCESSING_DELAY": ${POSTPROCESSING_DELAY:-0s}
IDM_CREATE_DEMO_USERS: "true"
IDM_ADMIN_PASSWORD: "admin"
FRONTEND_SEARCH_MIN_LENGTH: "2"
# s3ng specific settings
STORAGE_USERS_S3NG_ENDPOINT: http://ceph:8080
STORAGE_USERS_S3NG_REGION: default
@@ -30,8 +30,4 @@ services:
STORAGE_USERS_S3NG_BUCKET: test
volumes:
- ../../../config:/drone/src/tests/config
entrypoint: /bin/sh
# run ocis init to initialize a configuration file with random secrets
# it will fail on subsequent runs, because the config file already exists
# therefore we ignore the error and then start the ocis server
command: ["-c", "ocis init || true; ocis server"]
- ../../../ociswrapper/bin/ociswrapper:/usr/bin/ociswrapper
@@ -0,0 +1,13 @@
# custom Dockerfile required to run ociswrapper command
# mounting 'ociswrapper' binary doesn't work with image 'amd64/alpine:3.17' (busybox based)
ARG OCIS_IMAGE_TAG
FROM owncloud/ocis:${OCIS_IMAGE_TAG} as ocis
FROM ubuntu:22.04
COPY --from=ocis /usr/bin/ocis /usr/bin/ocis
COPY ["./serve-ocis.sh", "/usr/bin/serve-ocis"]
RUN chmod +x /usr/bin/serve-ocis
ENTRYPOINT [ "serve-ocis" ]
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
set -e
# init ocis
ocis init
if [ "$WITH_WRAPPER" = "true" ]; then
ociswrapper serve --bin=ocis
else
ocis server
fi