Skip to content

Commit

Permalink
Add developer guide/integration test section (opensearch-project#4330)
Browse files Browse the repository at this point in the history
* Add developer guide/integration test section

Aligned with Kafka example
https://github.com/opensearch-project/data-prepper/blob/51ee0df595aaad1b921c888394bf3e110ffc74e9/data-prepper-plugins/kafka-plugins/README.md#developer-guide

Signed-off-by: Jürgen Walter <juergen.walter@sap.com>

* Use latest OpenSearch for testing

Version 2.12.0 onwards requires to use non-default admin password
https://opensearch.org/blog/replacing-default-admin-credentials/

Signed-off-by: Jürgen Walter <juergen.walter@sap.com>

---------

Signed-off-by: Jürgen Walter <juergen.walter@sap.com>
  • Loading branch information
juergen-walter authored Apr 5, 2024
1 parent f5db86e commit 5589a6c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions data-prepper-plugins/opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -596,3 +596,20 @@ The default behavior is to process all indices.
#### <a name="index_configuration">Index Configuration</a>

* `index_name_regex`: A regex pattern to represent the index names for filtering

## Developer guide

### Integration tests

#### Run OpenSearch

Start an instance of OpenSearch that listens to opens port 9200 with default user admin:admin.
```
docker run -p 9200:9200 -e "discovery.type=single-node" -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=yourStrongPassword123!" opensearchproject/opensearch:latest
```
#### Run tests
```
./gradlew data-prepper-plugins:opensearch:integrationTest -Dtests.opensearch.host=localhost:9200 -Dtests.opensearch.user=admin -Dtests.opensearch.password=yourStrongPassword123!
```

0 comments on commit 5589a6c

Please sign in to comment.