Skip to content

Commit f690e88

Browse files
heartbleed1337heartbleed1337
andauthored
fix: Support Elasticsearch 9.x (#881)
Closes #860 Co-authored-by: heartbleed1337 <heartbleed@notapplicable.com>
1 parent 15e99ee commit f690e88

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/elasticsearch/testcontainers/elasticsearch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _environment_by_version(version: int) -> dict[str, str]:
4545
return {"discovery.zen.minimum_master_nodes": "1"}
4646
elif version == 7:
4747
return {}
48-
elif version == 8:
48+
elif version in {8, 9}:
4949
# Elasticsearch uses https now by default. However, our readiness
5050
# check uses http, which does not work. Hence we disable security
5151
# which should not be an issue for our context

modules/elasticsearch/tests/test_elasticsearch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
# The versions below should reflect the latest stable releases
10-
@pytest.mark.parametrize("version", ["7.17.18", "8.12.2"])
10+
@pytest.mark.parametrize("version", ["7.17.18", "8.12.2", "9.1.4"])
1111
def test_docker_run_elasticsearch(version):
1212
with ElasticSearchContainer(f"elasticsearch:{version}", mem_limit="3G") as es:
1313
resp = urllib.request.urlopen(f"http://{es.get_container_host_ip()}:{es.get_exposed_port(es.port)}")

0 commit comments

Comments
 (0)