Skip to content

Commit 36c89bf

Browse files
Update TESTING.md 'Building with extra plugins' documentation (#15893)
* Update TESTING.md 'Building with extra plugins' documentation Signed-off-by: Finn Carroll <carrofin@amazon.com> * Typo Signed-off-by: Finn Carroll <carrofin@amazon.com> * Fix TOC Signed-off-by: Finn Carroll <carrofin@amazon.com> --------- Signed-off-by: Finn Carroll <carrofin@amazon.com>
1 parent 260edc5 commit 36c89bf

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

TESTING.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ OpenSearch uses [jUnit](https://junit.org/junit5/) for testing, it also uses ran
3939
- [Expect a specific segment topology](#expect-a-specific-segment-topology)
4040
- [Leave environment in an unstable state after test](#leave-environment-in-an-unstable-state-after-test)
4141
- [Test coverage analysis](#test-coverage-analysis)
42-
- [Building with extra plugins](#building-with-extra-plugins)
42+
- [Testing with plugins](#testing-with-plugins)
4343
- [Environment misc](#environment-misc)
4444

4545
# Requirements
@@ -552,11 +552,17 @@ Apart from using Gradle, it is also possible to gain insight in code coverage us
552552

553553
Please read your IDE documentation for how to attach a debugger to a JVM process.
554554

555-
# Building with extra plugins
555+
# Testing with plugins
556556

557-
Additional plugins may be built alongside OpenSearch, where their dependency on OpenSearch will be substituted with the local OpenSearch build. To add your plugin, create a directory called `opensearch-extra` as a sibling of OpenSearch. Checkout your plugin underneath `opensearch-extra` and the build will automatically pick it up. You can verify the plugin is included as part of the build by checking the projects of the build.
557+
To test a plugin with a custom build of OpenSearch, build OpenSearch and use the `customDistributionUrl` setting supported by each plugin to override the OpenSearch distribution.
558558

559-
./gradlew projects
559+
For example, in your OpenSearch repository assemble a custom distribution.
560+
561+
./gradlew :distribution:archives:linux-tar:assemble
562+
563+
Then in your plugin repository, substitute in your OpenSearch build
564+
565+
./gradlew run -PcustomDistributionUrl="<OPENSEARCH-REPO-PATH>/distribution/archives/linux-tar/build/distributions/opensearch-min-3.0.0-SNAPSHOT-linux-x64.tar.gz"
560566

561567
# Environment misc
562568

0 commit comments

Comments
 (0)