diff --git a/.travis.install-elasticsearch.sh b/.travis.install-elasticsearch.sh index 276273e7..5d522f55 100644 --- a/.travis.install-elasticsearch.sh +++ b/.travis.install-elasticsearch.sh @@ -29,6 +29,10 @@ function remove_if_erroneus { } install_from_zip https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.16.zip elasticsearch-5.6.16 -install_from_zip https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.3.zip elasticsearch-6.8.3 -install_from_targz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.2-linux-x86_64.tar.gz elasticsearch-7.3.2 -install_from_targz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.1-linux-x86_64.tar.gz elasticsearch-7.4.1 +install_from_zip https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.12.zip elasticsearch-6.8.12 +install_from_targz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.2-linux-x86_64.tar.gz elasticsearch-7.4.2 +install_from_targz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.2-linux-x86_64.tar.gz elasticsearch-7.5.2 +install_from_targz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-linux-x86_64.tar.gz elasticsearch-7.6.2 +install_from_targz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.1-linux-x86_64.tar.gz elasticsearch-7.7.1 +install_from_targz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.1-linux-x86_64.tar.gz elasticsearch-7.8.1 +install_from_targz https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.0-linux-x86_64.tar.gz elasticsearch-7.9.0 diff --git a/.travis.yml b/.travis.yml index 76ce55a8..8844b9ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ dist: xenial -sudo: true language: python python: - 3.8 @@ -8,6 +7,9 @@ python: - 3.9-dev - nightly - pypy3 +env: + global: + - ES_JAVA_OPTS="-Xms256m -Xmx256m" # blocklist branches branches: except: diff --git a/README.rst b/README.rst index b321a7c3..aa12c341 100644 --- a/README.rst +++ b/README.rst @@ -153,12 +153,6 @@ You can pick which you prefer, but remember that these settings are handled in t - elasticsearch_transport_tcp_port - - - random - * - configuration path - - configuration_path - - --elasticsearch-configuration-path - - elasticsearch_configuration_path - - - - - /etc/elasticsearch Example usage: diff --git a/tests/conftest.py b/tests/conftest.py index 0a6cf348..7ec9ae68 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,9 +7,13 @@ ELASTICSEARCH_EXECUTABLE_5_6 = '/opt/es/elasticsearch-5.6.16/bin/elasticsearch' -ELASTICSEARCH_EXECUTABLE_6_8 = '/opt/es/elasticsearch-6.8.3/bin/elasticsearch' -ELASTICSEARCH_EXECUTABLE_7_3 = '/opt/es/elasticsearch-7.3.2/bin/elasticsearch' -ELASTICSEARCH_EXECUTABLE_7_4 = '/opt/es/elasticsearch-7.4.1/bin/elasticsearch' +ELASTICSEARCH_EXECUTABLE_6_8 = '/opt/es/elasticsearch-6.8.12/bin/elasticsearch' +ELASTICSEARCH_EXECUTABLE_7_4 = '/opt/es/elasticsearch-7.4.2/bin/elasticsearch' +ELASTICSEARCH_EXECUTABLE_7_5 = '/opt/es/elasticsearch-7.5.2/bin/elasticsearch' +ELASTICSEARCH_EXECUTABLE_7_6 = '/opt/es/elasticsearch-7.6.2/bin/elasticsearch' +ELASTICSEARCH_EXECUTABLE_7_7 = '/opt/es/elasticsearch-7.7.1/bin/elasticsearch' +ELASTICSEARCH_EXECUTABLE_7_8 = '/opt/es/elasticsearch-7.8.1/bin/elasticsearch' +ELASTICSEARCH_EXECUTABLE_7_9 = '/opt/es/elasticsearch-7.9.0/bin/elasticsearch' def elasticsearch_fixture_factory(executable, proc_name, port, **kwargs): @@ -26,15 +30,27 @@ def elasticsearch_fixture_factory(executable, proc_name, port, **kwargs): elasticsearch_proc_6_8, elasticsearch_6_8 = elasticsearch_fixture_factory( ELASTICSEARCH_EXECUTABLE_6_8, 'elasticsearch_proc_6_8', port=None ) -elasticsearch_proc_7_3, elasticsearch_7_3 = elasticsearch_fixture_factory( - ELASTICSEARCH_EXECUTABLE_7_3, 'elasticsearch_proc_7_3', port=None -) elasticsearch_proc_7_4, elasticsearch_7_4 = elasticsearch_fixture_factory( ELASTICSEARCH_EXECUTABLE_7_4, 'elasticsearch_proc_7_4', port=None ) +elasticsearch_proc_7_5, elasticsearch_7_5 = elasticsearch_fixture_factory( + ELASTICSEARCH_EXECUTABLE_7_5, 'elasticsearch_proc_7_5', port=None +) +elasticsearch_proc_7_6, elasticsearch_7_6 = elasticsearch_fixture_factory( + ELASTICSEARCH_EXECUTABLE_7_6, 'elasticsearch_proc_7_6', port=None +) +elasticsearch_proc_7_7, elasticsearch_7_7 = elasticsearch_fixture_factory( + ELASTICSEARCH_EXECUTABLE_7_7, 'elasticsearch_proc_7_7', port=None +) +elasticsearch_proc_7_8, elasticsearch_7_8 = elasticsearch_fixture_factory( + ELASTICSEARCH_EXECUTABLE_7_8, 'elasticsearch_proc_7_8', port=None +) +elasticsearch_proc_7_9, elasticsearch_7_9 = elasticsearch_fixture_factory( + ELASTICSEARCH_EXECUTABLE_7_9, 'elasticsearch_proc_7_9', port=None +) elasticsearch_proc2 = factories.elasticsearch_proc( - executable=ELASTICSEARCH_EXECUTABLE_7_4, port=9393 + executable=ELASTICSEARCH_EXECUTABLE_7_9, port=9393 ) elasticsearch_nooproc2 = factories.elasticsearch_noproc(port=9393) elasticsearch2 = factories.elasticsearch('elasticsearch_proc2') diff --git a/tests/test_elastic.py b/tests/test_elastic.py index 041d9146..04876766 100644 --- a/tests/test_elastic.py +++ b/tests/test_elastic.py @@ -18,14 +18,8 @@ VERSION_STRING_6_8 = ( 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' 'deprecated in version 9.0 and will likely be removed in a future release.' - '\nVersion: 6.8.2, Build: default/zip/b506955/2019-07-24T15:24:41.545295Z, ' - 'JVM: 11.0.2' -) -VERSION_STRING_6_8_3 = ( - 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' - 'deprecated in version 9.0 and will likely be removed in a future release.' - '\nVersion: 6.8.3, Build: default/zip/0c48c0e/2019-08-29T19:05:24.312154Z, ' - 'JVM: 11.0.2' + '\nVersion: 6.8.12, Build: default/zip/7a15d2a/2020-08-12T07:27:20.804867Z,' + ' JVM: 11.0.2' ) VERSION_STRING_7_3 = ( 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' @@ -42,18 +36,52 @@ VERSION_STRING_7_4 = ( 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' 'deprecated in version 9.0 and will likely be removed in a future release.' - '\nVersion: 7.4.1, Build: default/tar/fc0eeb6e2c25915d63d871d344e3d0b45ea0e' - 'a1e/2019-10-22T17:16:35.176724Z, JVM: 11.0.2' + '\nVersion: 7.4.2, Build: default/tar/2f90bbf7b93631e52bafb59b3b049cb44ec25' + 'e96/2019-10-28T20:40:44.881551Z, JVM: 11.0.2' +) +VERSION_STRING_7_5 = ( + 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' + 'deprecated in version 9.0 and will likely be removed in a future release.' + '\nVersion: 7.5.2, Build: default/tar/8bec50e1e0ad29dad5653712cf3bb580cd1af' + 'cdf/2020-01-15T12:11:52.313576Z, JVM: 11.0.2' +) +VERSION_STRING_7_6 = ( + 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' + 'deprecated in version 9.0 and will likely be removed in a future release.' + '\nVersion: 7.6.2, Build: default/tar/ef48eb35cf30adf4db14086e8aabd07ef6fb1' + '13f/2020-03-26T06:34:37.794943Z, JVM: 11.0.2' +) +VERSION_STRING_7_7 = ( + 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' + 'deprecated in version 9.0 and will likely be removed in a future release.' + '\nVersion: 7.7.1, Build: default/tar/ad56dce891c901a492bb1ee393f12dfff473a' + '423/2020-05-28T16:30:01.040088Z, JVM: 11.0.2' +) +VERSION_STRING_7_8 = ( + 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' + 'deprecated in version 9.0 and will likely be removed in a future release.' + '\nVersion: 7.8.1, Build: default/tar/b5ca9c58fb664ca8bf9e4057fc229b3396bf3' + 'a89/2020-07-21T16:40:44.668009Z, JVM: 11.0.2' +) +VERSION_STRING_7_9 = ( + 'OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was ' + 'deprecated in version 9.0 and will likely be removed in a future release.' + '\nVersion: 7.9.0, Build: default/tar/a479a2a7fce0389512d6a9361301708b92dff' + '667/2020-08-11T21:36:48.204330Z, JVM: 11.0.2' ) @pytest.mark.parametrize('output, expected_version', ( (VERSION_STRING_5_6, '5.6.16'), - (VERSION_STRING_6_8, '6.8.2'), - (VERSION_STRING_6_8_3, '6.8.3'), + (VERSION_STRING_6_8, '6.8.12'), (VERSION_STRING_7_3, '7.3.0'), (VERSION_STRING_7_3_2, '7.3.2'), - (VERSION_STRING_7_4, '7.4.1'), + (VERSION_STRING_7_4, '7.4.2'), + (VERSION_STRING_7_5, '7.5.2'), + (VERSION_STRING_7_6, '7.6.2'), + (VERSION_STRING_7_7, '7.7.1'), + (VERSION_STRING_7_8, '7.8.1'), + (VERSION_STRING_7_9, '7.9.0'), )) def test_version_extraction(output, expected_version): """Verify if we can properly extract elasticsearch version.""" @@ -73,8 +101,12 @@ def test_version_extraction(output, expected_version): @pytest.mark.parametrize('elasticsearch_proc_name', ( 'elasticsearch_proc_5_6', 'elasticsearch_proc_6_8', - 'elasticsearch_proc_7_3', 'elasticsearch_proc_7_4', + 'elasticsearch_proc_7_5', + 'elasticsearch_proc_7_6', + 'elasticsearch_proc_7_7', + 'elasticsearch_proc_7_8', + 'elasticsearch_proc_7_9', )) def test_elastic_process(request, elasticsearch_proc_name): """Simple test for starting elasticsearch_proc.""" @@ -85,8 +117,12 @@ def test_elastic_process(request, elasticsearch_proc_name): @pytest.mark.parametrize('elasticsearch_name', ( 'elasticsearch_5_6', 'elasticsearch_6_8', - 'elasticsearch_7_3', 'elasticsearch_7_4', + 'elasticsearch_7_5', + 'elasticsearch_7_6', + 'elasticsearch_7_7', + 'elasticsearch_7_8', + 'elasticsearch_7_9', )) def test_elasticsearch(request, elasticsearch_name): """Test if elasticsearch fixtures connects to process."""