Switch Elasticsearch IT tests to use testcontainers (#5391)
* Add a ElasticsearchBaseTest class based on the testcontainers project This is supposed to be a replacement for the nosqlunit based ElasticsearchBase class. It's using the testcontainers library to provide Elasticsearch instances for integration test executions. * Switch all existing ES integration tests over to ElasticsearchBaseTest This makes the nosqlunit based ElasticsearchBase obsolete. * Enable INFO log level for "org.graylog" in the test log4j2 config * Delete unused ElasticsearchBase test class * Remove old elasticsearch integration test maven configuration - Remove unused "it.es.*" properties - Only run ES integration tests when "it.es" property is enabled - Remove elasticsearch-maven-plugin dependency and config * Switch log statements to DEBUG in ElasticsearchInstance * Limit elasticsearch instances to 512 MB memory This should be enough to run tests. * Remove now unused nosqlunit-elasticsearch-http dependency * Reuse Elasticsearch containers Instead of creating a new container for every test, we reuse one for all of them. Indices and Templates are cleared between tests. Before this change every affected test needed about 10s to spin up the container and ES instance. Now most of them need well under 1s. * Remove unnecessary cleanup code in ES integration tests * Add settings to ES container discovery.type=single-node should avoid clashes with other es containers running in the same network. there should be none right now, but we want to at least test different es versions in the future. action.auto_create_index=false does what it says. we don't want indices to get created on the fly. * Move utility methods from ElasticSearchBaseTest to custom client * wrapped JestClient in custom client * moved utility methods from ElasticSearchBaseTest to new client so that 1.) the scope of ElasticSearchBaseTest gets narrowed down to providing the ES instance for the test suite 2.) utility methods can be reused without having to inherit from base class * cleaned up some tests * Add license header * Fixed type * Bump testcontainers to latest version * Use latest elasticsearch version as default in test container * Reuse IndexMappingFactory in ElasticsearchBaseTest
|4 days ago|
|.github||6 days ago|
|bin||3 months ago|
|config||1 year ago|
|docs||1 year ago|
|graylog-plugin-archetype||6 days ago|
|graylog-plugin-parent||3 months ago|
|graylog-project-parent||4 days ago|
|graylog2-server||4 days ago|
|graylog2-web-interface||4 days ago|
|integration-tests||3 months ago|
|lib/sigar-1.6.4||4 years ago|
|misc||3 weeks ago|
|.editorconfig||3 months ago|
|.gitignore||3 years ago|
|.mailmap||4 years ago|
|.travis.yml||1 year ago|
|AUTHORS||9 years ago|
|CODE_OF_CONDUCT.md||3 years ago|
|CONTRIBUTING.md||3 years ago|
|COPYING||9 years ago|
|README.markdown||5 days ago|
|SECURITY.md||2 months ago|
|UPGRADING.rst||10 months ago|
|manifest.mf||9 years ago|
|pom.xml||4 days ago|
Welcome! Graylog is an open source log management platform.
Found a bug? Have an idea for an improvement? Feel free to add an issue.
Help us build the future of log management and be part of a project that is used by thousands of people out there every day.
Do you want to get paid for developing our open source product? Apply for one of our jobs!
Graylog is released under version 3.0 of the GNU General Public License.