# How to add custom settings in ElasticsearchSingleNodeTest unit tests

**URL:** <https://discuss.elastic.co/t/how-to-add-custom-settings-in-elasticsearchsinglenodetest-unit-tests/26542>\
**Category:** Elasticsearch\
**Created:** [July 30, 2015, 5:06am UTC](https://discuss.elastic.co/t/how-to-add-custom-settings-in-elasticsearchsinglenodetest-unit-tests/26542 "2015-07-30T05:06:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jconwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jconwell/32/4059_2.png) [@jconwell](https://discuss.elastic.co/u/jconwell)\
**Post date:** [July 30, 2015, 5:06am UTC](https://discuss.elastic.co/t/how-to-add-custom-settings-in-elasticsearchsinglenodetest-unit-tests/26542/1 "2015-07-30T05:06:09Z")

</div>

I've got a plug in service that inherits from AbstractLifecycleComponent that reads custom settings from the elasticsearch.yaml file.

How can I configure tests that inherit from ElasticsearchSingleNodeTest to use load my custom settings that the service needs instead of its default settings?

Or maybe there is a way to bind a Settings instance to my service that I populate manually just for my test?

---

<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 5, 2017, 11:58pm UTC](https://discuss.elastic.co/t/how-to-add-custom-settings-in-elasticsearchsinglenodetest-unit-tests/26542/2 "2017-07-05T23:58:10Z")

</div>


