# Plugin development: custom distribution for yamlRestTest ? (7.16)

**URL:** <https://discuss.elastic.co/t/plugin-development-custom-distribution-for-yamlresttest-7-16/295368>\
**Category:** Elasticsearch\
**Created:** [January 25, 2022, 3:55pm UTC](https://discuss.elastic.co/t/plugin-development-custom-distribution-for-yamlresttest-7-16/295368 "2022-01-25T15:55:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhugo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mhugo/32/99205_2.png) [@mhugo](https://discuss.elastic.co/u/mhugo)\
**Post date:** [January 25, 2022, 3:55pm UTC](https://discuss.elastic.co/t/plugin-development-custom-distribution-for-yamlresttest-7-16/295368/1 "2022-01-25T15:55:26Z")

</div>

Hi,

I'm migrating [a plugin](https://github.com/opendatasoft/elasticsearch-plugin-geoshape/tree/7.10) to the last 7.16.3 version and have trouble figuring out how to make yaml REST tests pass. The ES distribution that is used to run these tests does not seem to include everything needed to run my tests.

This is a plugin that adds geometry computation (simplification) thanks to JTS. The ES distribution used for yamlRestTests ([this one](https://mvnrepository.com/artifact/org.elasticsearch.distribution.integ-test-zip/elasticsearch/7.16.3) if I am correct) does not include geo dependencies (namely legacy-geo, jts and its dependencies).

I am not very comfortable with Gradle, but would there be a simple way to add plugins to the ES distribution before running tests ? or use another custom distribution ?

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [January 26, 2022, 3:55pm UTC](https://discuss.elastic.co/t/plugin-development-custom-distribution-for-yamlresttest-7-16/295368/2 "2022-01-26T15:55:11Z")

</div>

It should be a syntax similar to what we have done here:

> <https://github.com/elastic/elasticsearch/blob/c8ceda800706eafe503e84c1044c58ae0e04ee9b/x-pack/plugin/vector-tile/build.gradle#L35>

I think for yaml test there is a `yamlRestTestImplementation` call.

---

<div class="post-metadata">

**Author:** ![mhugo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mhugo/32/99205_2.png) [@mhugo](https://discuss.elastic.co/u/mhugo)\
**Post date:** [January 27, 2022, 9:41am UTC](https://discuss.elastic.co/t/plugin-development-custom-distribution-for-yamlresttest-7-16/295368/3 "2022-01-27T09:41:23Z")

</div>

Thanks for your answer.

However, I've already tried to add dependencies to `yamlRestTestImplementation`. It does resolve problems during compilation of tests, but has no effect during execution of tests.

If I add `yamlRestTestImplementation "org.locationtech.jts:jts-core:1.15.0"`, I still get an error when the tests are launched: `java.lang.NoClassDefFoundError: org/locationtech/jts/io/ParseException`. I think this is because the ES distribution used for tests is very minimal and does not include these dependencies.

In `6.8`, we used to add `testClusters.all { testDistribution = 'oss'}` so that tests were running on a full-blown OSS distribution of ES (with all dependencies already loaded). But I was not able to find an equivalent in 7.16

---

<div class="post-metadata">

**Author:** ![mhugo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mhugo/32/99205_2.png) [@mhugo](https://discuss.elastic.co/u/mhugo)\
**Post date:** [January 27, 2022, 9:43am UTC](https://discuss.elastic.co/t/plugin-development-custom-distribution-for-yamlresttest-7-16/295368/4 "2022-01-27T09:43:44Z")

</div>

Hmm it seems `testCulsters.all { testDistribution = 'DEFAULT' }` uses a "complete" ES distribution for running tests and gives better results in my case ... (the legacy geo module is here and tests seem to be launched).  
So it means 'INTEG\_TEST' is the default value ("DEFAULT" is not the default value ...)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 24, 2022, 9:44am UTC](https://discuss.elastic.co/t/plugin-development-custom-distribution-for-yamlresttest-7-16/295368/5 "2022-02-24T09:44:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
