# Help writing a test for a custom plugin in ES

**URL:** <https://discuss.elastic.co/t/help-writing-a-test-for-a-custom-plugin-in-es/236316>\
**Category:** Elasticsearch\
**Created:** [June 9, 2020, 10:52am UTC](https://discuss.elastic.co/t/help-writing-a-test-for-a-custom-plugin-in-es/236316 "2020-06-09T10:52:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahulkarajgikar](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@rahulkarajgikar](https://discuss.elastic.co/u/rahulkarajgikar)\
**Post date:** [June 9, 2020, 10:52am UTC](https://discuss.elastic.co/t/help-writing-a-test-for-a-custom-plugin-in-es/236316/1 "2020-06-09T10:52:45Z")

</div>

Hi everyone,

I'm trying to create a test for a plugin that should be able to do these 3 things:

1. Start a cluster(can have one node) with my plugin installed on each node.
2. Customize the `elasticsearch.yml` for the nodes in the cluster, because my plugin uses a custom setting that I need in each node.
3. Send rest requests to the cluster using a `RestClient`.

I've tried extending `ESSingleNodeTestCase`, but I'm not able to send rest requests (point 3),I can only send some requests using `client()` ,which is not what i want; it doesn't allow me to send whatever request I want to an endpoint.

I've also tried extending `ESClientYamlSuiteTestCase`, but I wasn't able to figure out how to customize the cluster settings(point 2)

Does anyone know of a way to write a test that will do all the 3 things I want?

Thanks a lot!

---

<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:** [July 7, 2020, 10:53am UTC](https://discuss.elastic.co/t/help-writing-a-test-for-a-custom-plugin-in-es/236316/2 "2020-07-07T10:53:04Z")

</div>

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