[tests-only][full-ci]Added documentation to run tika service related tests (#7295)
* Added documentation to run tika service related tests * Added documentation for docker compose as well * Make tika service run only for tika
This commit is contained in:
@@ -80,6 +80,17 @@ make -C tests/acceptance/docker test-ocis-feature-ocis-storage
|
|||||||
|
|
||||||
{{< /hint >}}
|
{{< /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 >}}
|
{{< 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.
|
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.
|
||||||
|
|
||||||
@@ -376,6 +387,48 @@ BEHAT_FEATURE="tests/acceptance/features/apiNotification/emailNotification.featu
|
|||||||
make test-acceptance-api
|
make test-acceptance-api
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Running Test Suite With Tika Service (@tikaServiceNeeded)
|
||||||
|
|
||||||
|
Test suites that are tagged with `@tikaServiceNeeded` require tika service.
|
||||||
|
|
||||||
|
### Setup Tika Service
|
||||||
|
|
||||||
|
Run the following docker command to setup tika service
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d -p 127.0.0.1:9998:9998 apache/tika
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run oCIS
|
||||||
|
|
||||||
|
Documentation related to the content based search and tika extractor can be found [here](https://doc.owncloud.com/ocis/next/deployment/services/s-list/search.html#content-extraction)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# init oCIS
|
||||||
|
IDM_ADMIN_PASSWORD=admin \
|
||||||
|
ocis/bin/ocis init --insecure true
|
||||||
|
|
||||||
|
# run oCIS
|
||||||
|
PROXY_ENABLE_BASIC_AUTH=true \
|
||||||
|
OCIS_INSECURE=true \
|
||||||
|
SEARCH_EXTRACTOR_TYPE=tika \
|
||||||
|
SEARCH_EXTRACTOR_TIKA_TIKA_URL=http://localhost:9998 \
|
||||||
|
SEARCH_EXTRACTOR_CS3SOURCE_INSECURE=true \
|
||||||
|
ocis/bin/ocis server
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run the Acceptance Test
|
||||||
|
|
||||||
|
Run the acceptance test with the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
TEST_WITH_GRAPH_API=true \
|
||||||
|
TEST_OCIS=true \
|
||||||
|
TEST_SERVER_URL="https://localhost:9200" \
|
||||||
|
BEHAT_FEATURE="tests/acceptance/features/apiSearch/contentSearch.feature" \
|
||||||
|
make test-acceptance-api
|
||||||
|
```
|
||||||
|
|
||||||
## Running Tests for Parallel Deployment
|
## Running Tests for Parallel Deployment
|
||||||
|
|
||||||
### Setup the Parallel Deployment Environment
|
### Setup the Parallel Deployment Environment
|
||||||
@@ -450,7 +503,7 @@ The commands are ubuntu specific and may differ according to your system. You ca
|
|||||||
|
|
||||||
##### Mac OS user
|
##### Mac OS user
|
||||||
Install ClamAV using [here](https://gist.github.com/mendozao/3ea393b91f23a813650baab9964425b9)
|
Install ClamAV using [here](https://gist.github.com/mendozao/3ea393b91f23a813650baab9964425b9)
|
||||||
Start ClamAV daemon
|
Start ClamAV daemon
|
||||||
```bash
|
```bash
|
||||||
/your/location/to/brew/Cellar/clamav/1.1.0/sbin/clamd
|
/your/location/to/brew/Cellar/clamav/1.1.0/sbin/clamd
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -30,6 +30,17 @@ OCIS_IMAGE_TAG ?= dev
|
|||||||
WITH_WRAPPER ?= true
|
WITH_WRAPPER ?= true
|
||||||
OCIS_WRAPPER := ../../ociswrapper/bin/ociswrapper
|
OCIS_WRAPPER := ../../ociswrapper/bin/ociswrapper
|
||||||
|
|
||||||
|
ifdef START_TIKA
|
||||||
|
ifeq ($(START_TIKA),true)
|
||||||
|
COMPOSE_FILE := $(COMPOSE_FILE):src/tika.yml
|
||||||
|
SEARCH_EXTRACTOR_TYPE := tika
|
||||||
|
else
|
||||||
|
SEARCH_EXTRACTOR_TYPE := basic
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
SEARCH_EXTRACTOR_TYPE := basic
|
||||||
|
endif
|
||||||
|
|
||||||
# static
|
# static
|
||||||
DIVIDE_INTO_NUM_PARTS := 10
|
DIVIDE_INTO_NUM_PARTS := 10
|
||||||
PARTS = 1 2 3 4 5 6 7 8 9 10
|
PARTS = 1 2 3 4 5 6 7 8 9 10
|
||||||
@@ -190,6 +201,11 @@ testSuite: $(OCIS_WRAPPER) build-dev-image clean-docker-container
|
|||||||
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
|
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
|
||||||
COMPOSE_FILE=src/antivirus.yml \
|
COMPOSE_FILE=src/antivirus.yml \
|
||||||
docker-compose run start_antivirus; \
|
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; \
|
fi; \
|
||||||
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
|
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
|
||||||
COMPOSE_FILE=$(COMPOSE_FILE) \
|
COMPOSE_FILE=$(COMPOSE_FILE) \
|
||||||
@@ -199,6 +215,7 @@ testSuite: $(OCIS_WRAPPER) build-dev-image clean-docker-container
|
|||||||
OCIS_ASYNC_UPLOADS=$(OCIS_ASYNC_UPLOADS) \
|
OCIS_ASYNC_UPLOADS=$(OCIS_ASYNC_UPLOADS) \
|
||||||
OCIS_ADD_RUN_SERVICES=$(OCIS_ADD_RUN_SERVICES) \
|
OCIS_ADD_RUN_SERVICES=$(OCIS_ADD_RUN_SERVICES) \
|
||||||
POSTPROCESSING_STEPS=$(POSTPROCESSING_STEPS) \
|
POSTPROCESSING_STEPS=$(POSTPROCESSING_STEPS) \
|
||||||
|
SEARCH_EXTRACTOR_TYPE=$(SEARCH_EXTRACTOR_TYPE) \
|
||||||
OCIS_IMAGE_TAG=$(OCIS_IMAGE_TAG) \
|
OCIS_IMAGE_TAG=$(OCIS_IMAGE_TAG) \
|
||||||
BEHAT_SUITE=$(BEHAT_SUITE) \
|
BEHAT_SUITE=$(BEHAT_SUITE) \
|
||||||
BEHAT_FEATURE=$(BEHAT_FEATURE) \
|
BEHAT_FEATURE=$(BEHAT_FEATURE) \
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ services:
|
|||||||
# postprocessing step
|
# postprocessing step
|
||||||
POSTPROCESSING_STEPS: $POSTPROCESSING_STEPS
|
POSTPROCESSING_STEPS: $POSTPROCESSING_STEPS
|
||||||
|
|
||||||
|
# tika
|
||||||
|
SEARCH_EXTRACTOR_TYPE: $SEARCH_EXTRACTOR_TYPE
|
||||||
|
SEARCH_EXTRACTOR_TIKA_TIKA_URL: "http://tika:9998"
|
||||||
|
SEARCH_EXTRACTOR_CS3SOURCE_INSECURE: "true"
|
||||||
|
|
||||||
# fonts map for txt thumbnails (including unicode support)
|
# fonts map for txt thumbnails (including unicode support)
|
||||||
THUMBNAILS_TXT_FONTMAP_FILE: "/drone/src/tests/config/drone/fontsMap.json"
|
THUMBNAILS_TXT_FONTMAP_FILE: "/drone/src/tests/config/drone/fontsMap.json"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user