Skip to content

Commit

Permalink
[tests-only][full-ci]Added documentation for running tika related t…
Browse files Browse the repository at this point in the history
…ests (#7342)

* Added documentation to run tika service related tests

* Added documentation for docker compose as well

* Make tika service run only for tika
  • Loading branch information
SagarGi committed Sep 25, 2023
1 parent 2b52444 commit 4345b54
Show file tree
Hide file tree
Showing 65 changed files with 158 additions and 105 deletions.
55 changes: 54 additions & 1 deletion 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 Expand Up @@ -376,6 +387,48 @@ BEHAT_FEATURE="tests/acceptance/features/apiNotification/emailNotification.featu
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

### Setup the Parallel Deployment Environment
Expand Down Expand Up @@ -450,7 +503,7 @@ The commands are ubuntu specific and may differ according to your system. You ca

##### Mac OS user
Install ClamAV using [here](https://gist.github.com/mendozao/3ea393b91f23a813650baab9964425b9)
Start ClamAV daemon
Start ClamAV daemon
```bash
/your/location/to/brew/Cellar/clamav/1.1.0/sbin/clamd
```
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/antivirus_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the antivirus service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/app-provider_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the app-provider service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/app-registry_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the app-registry service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/audit_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the audit service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
4 changes: 2 additions & 2 deletions services/_includes/adoc/auth-basic_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the auth-basic service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down Expand Up @@ -263,7 +263,7 @@ LDAP DN to use for simple bind authentication with the target LDAP server.
a|`OCIS_LDAP_BIND_PASSWORD` +
`LDAP_BIND_PASSWORD` +
`AUTH_BASIC_LDAP_BIND_PASSWORD` +
xref:deprecation-note-2023-09-25-04-17-06[Deprecation Note]
xref:deprecation-note-2023-09-25-09-51-53[Deprecation Note]
a| [subs=-attributes]
++string ++
a| [subs=-attributes]
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/auth-bearer_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the auth-bearer service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/auth-machine_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the auth-machine service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/eventhistory_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the eventhistory service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/frontend_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the frontend service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
2 changes: 1 addition & 1 deletion services/_includes/adoc/gateway_configvars.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ifeval::[{show-deprecation} == true]

[#deprecation-note-2023-09-25-04-17-06]
[#deprecation-note-2023-09-25-09-51-53]
[caption=]
.Deprecation notes for the gateway service
[width="100%",cols="~,~,~,~",options="header"]
Expand Down
Loading

0 comments on commit 4345b54

Please sign in to comment.