Skip to content

Commit

Permalink
Added documentation for docker compose as well
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarGi committed Sep 21, 2023
1 parent 0a43ede commit bc49f68
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/ocis/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ make -C tests/acceptance/docker test-ocis-feature-ocis-storage

{{< /hint >}}

{{< hint info >}}
To run the tests that require tika service (tests tagged with `@tikaServiceNeeded`), you need to provide `START_TIKA=true` while running the tests.

```bash
START_TIKA=true \
BEHAT_FEATURE='tests/acceptance/features/apiSearch/contentSearch.feature' \
make -C tests/acceptance/docker test-ocis-feature-ocis-storage
```

{{< /hint >}}

{{< hint info >}}
To run the tests that require an antivirus service (tests tagged with `@antivirus`), you need to provide the following environment variables while running the tests.

Expand Down
5 changes: 5 additions & 0 deletions tests/acceptance/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ testSuite: $(OCIS_WRAPPER) build-dev-image clean-docker-container
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
COMPOSE_FILE=src/antivirus.yml \
docker-compose run start_antivirus; \
fi; \
if [ "${START_TIKA}" == "true" ]; then \
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
COMPOSE_FILE=src/tika.yml \
docker-compose run tika-service; \
fi; \
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
COMPOSE_FILE=$(COMPOSE_FILE) \
Expand Down
5 changes: 5 additions & 0 deletions tests/acceptance/docker/src/ocis-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ services:
# postprocessing step
POSTPROCESSING_STEPS: $POSTPROCESSING_STEPS

# tika
SEARCH_EXTRACTOR_TYPE: "tika"
SEARCH_EXTRACTOR_TIKA_TIKA_URL: "http://tika:9998"
SEARCH_EXTRACTOR_CS3SOURCE_INSECURE: "true"

# fonts map for txt thumbnails (including unicode support)
THUMBNAILS_TXT_FONTMAP_FILE: "/drone/src/tests/config/drone/fontsMap.json"
volumes:
Expand Down
8 changes: 8 additions & 0 deletions tests/acceptance/docker/src/tika.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
tika-service:
image: dadarek/wait-for-dependencies
depends_on:
- tika
command: tika:9998
tika:
image: apache/tika:2.8.0.0

0 comments on commit bc49f68

Please sign in to comment.