mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-13 07:35:08 -06:00
[tests-only][full-ci] Update local test docker-compose setup to allow unicode preview tests (#6940)
* update local test docker-compose setup to allow unicode preview tests * update docs
This commit is contained in:
@@ -499,3 +499,20 @@ TEST_SERVER_URL="https://localhost:9200" \
|
||||
BEHAT_FEATURE="tests/acceptance/features/apiAntivirus/antivirus.feature" \
|
||||
make test-acceptance-api
|
||||
```
|
||||
|
||||
## Running Text Preview Tests Containing Unicode Characters
|
||||
|
||||
There are some tests that check the text preview of files containing Unicode characters. The oCIS server by default cannot generate the thumbnail of such files correctly but it provides an environment variable to allow the use of custom fonts that support Unicode characters. So to run such tests successfully, we have to run the oCIS server with this environment variable.
|
||||
|
||||
```bash
|
||||
...
|
||||
THUMBNAILS_TXT_FONTMAP_FILE="/path/to/fontsMap.json"
|
||||
ocis/bin/ocis server
|
||||
```
|
||||
|
||||
The sample `fontsMap.json` file is located in `tests/config/drone/fontsMap.json`.
|
||||
```json
|
||||
{
|
||||
"defaultFont": "/path/to/ocis/tests/config/drone/NotoSans.ttf"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -175,7 +175,7 @@ $(targets):
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
|
||||
.PHONY: testSuite
|
||||
testSuite: $(OCIS_WRAPPER) build-dev-image clean-docker-container
|
||||
testSuite: $(OCIS_WRAPPER) build-dev-image clean-docker-container ../../../vendor-bin/behat/composer.lock ../../../composer.lock
|
||||
@if [ -n "${START_CEPH}" ]; then \
|
||||
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
|
||||
COMPOSE_FILE=src/ceph.yml \
|
||||
@@ -257,3 +257,11 @@ clean-files:
|
||||
|
||||
.PHONY: clean
|
||||
clean: clean-docker-container clean-docker-volumes clean-dev-docker-image clean-files ## clean all
|
||||
|
||||
../../../vendor-bin/behat/composer.lock: ../../../vendor-bin/behat/composer.json
|
||||
@echo behat composer.lock is not up to date.
|
||||
@composer update --no-progress -d ../../../vendor-bin/behat
|
||||
|
||||
../../../composer.lock: ../../../composer.json
|
||||
@echo composer.lock is not up to date.
|
||||
@composer update --no-progress -d ../../../
|
||||
@@ -42,6 +42,9 @@ services:
|
||||
|
||||
# postprocessing step
|
||||
POSTPROCESSING_STEPS: $POSTPROCESSING_STEPS
|
||||
|
||||
# fonts map for txt thumbnails (including unicode support)
|
||||
THUMBNAILS_TXT_FONTMAP_FILE: "/drone/src/tests/config/drone/fontsMap.json"
|
||||
volumes:
|
||||
- ../../../config:/drone/src/tests/config
|
||||
- ../../../ociswrapper/bin/ociswrapper:/usr/bin/ociswrapper
|
||||
|
||||
Reference in New Issue
Block a user