Plugin development: custom distribution for yamlRestTest ? (7.16)

Hi,

I'm migrating a plugin 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 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.

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

I think for yaml test there is a yamlRestTestImplementation call.

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

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 ...)

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