Merge pull request #6943 from owncloud/tests/update-local-compose-port

[tests-only][full-ci] Update local test docker-compose setup to allow unicode preview tests (#6940)
This commit is contained in:
Phil Davis authored and GitHub committed 2023-08-02 18:42:28 +05:45
commit 45f4db7279
3 files changed
+29 -1

No files matched your search

+17
View File
@@ -493,3 +493,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"
}
```
+9 -1
View File
@@ -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