Skip to content

Commit e3a39c9

Browse files
committed
Clean up more unusable functionality from tests
1 parent e5c65da commit e3a39c9

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

test_elasticsearch_serverless/test_async/test_server/test_helpers.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ async def test_all_errors_from_chunk_are_raised_on_failure(self, async_client):
125125
await async_client.indices.create(
126126
index="i",
127127
mappings={"properties": {"a": {"type": "integer"}}},
128-
settings={"number_of_shards": 1, "number_of_replicas": 0},
129128
)
130129
await async_client.cluster.health(wait_for_status="yellow")
131130

@@ -334,7 +333,6 @@ async def test_errors_are_reported_correctly(self, async_client):
334333
await async_client.indices.create(
335334
index="i",
336335
mappings={"properties": {"a": {"type": "integer"}}},
337-
settings={"number_of_shards": 1, "number_of_replicas": 0},
338336
)
339337
await async_client.cluster.health(wait_for_status="yellow")
340338

@@ -358,7 +356,6 @@ async def test_error_is_raised(self, async_client):
358356
await async_client.indices.create(
359357
index="i",
360358
mappings={"properties": {"a": {"type": "integer"}}},
361-
settings={"number_of_shards": 1, "number_of_replicas": 0},
362359
)
363360
await async_client.cluster.health(wait_for_status="yellow")
364361

@@ -402,7 +399,6 @@ async def test_errors_are_collected_properly(self, async_client):
402399
await async_client.indices.create(
403400
index="i",
404401
mappings={"properties": {"a": {"type": "integer"}}},
405-
settings={"number_of_shards": 1, "number_of_replicas": 0},
406402
)
407403
await async_client.cluster.health(wait_for_status="yellow")
408404

@@ -947,7 +943,6 @@ async def test_all_documents_get_moved(self, async_client, reindex_setup):
947943
@pytest.fixture(scope="function")
948944
async def parent_reindex_setup(async_client):
949945
body = {
950-
"settings": {"number_of_shards": 1, "number_of_replicas": 0},
951946
"mappings": {
952947
"properties": {
953948
"question_answer": {

test_elasticsearch_serverless/test_async/test_server/test_mapbox_vector_tile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ async def mvt_setup(async_client):
7373
)
7474

7575

76-
async def test_mapbox_vector_tile_error(elasticsearch_url, mvt_setup, ca_certs):
77-
client = AsyncElasticsearch(elasticsearch_url, ca_certs=ca_certs)
76+
async def test_mapbox_vector_tile_error(elasticsearch_url, mvt_setup):
77+
client = AsyncElasticsearch(elasticsearch_url)
7878
await client.search_mvt(
7979
index="museums",
8080
zoom=13,
@@ -113,13 +113,13 @@ async def test_mapbox_vector_tile_error(elasticsearch_url, mvt_setup, ca_certs):
113113
}
114114

115115

116-
async def test_mapbox_vector_tile_response(elasticsearch_url, mvt_setup, ca_certs):
116+
async def test_mapbox_vector_tile_response(elasticsearch_url, mvt_setup):
117117
try:
118118
import mapbox_vector_tile
119119
except ImportError:
120120
return pytest.skip("Requires the 'mapbox-vector-tile' package")
121121

122-
client = AsyncElasticsearch(elasticsearch_url, ca_certs=ca_certs)
122+
client = AsyncElasticsearch(elasticsearch_url)
123123

124124
resp = await client.search_mvt(
125125
index="museums",

test_elasticsearch_serverless/test_server/test_helpers.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def test_bulk_all_errors_from_chunk_are_raised_on_failure(sync_client):
8181
"mappings": {"properties": {"a": {"type": "integer"}}},
8282
},
8383
)
84-
sync_client.cluster.health(wait_for_status="yellow")
8584

8685
try:
8786
for ok, _ in helpers.streaming_bulk(
@@ -323,7 +322,6 @@ def test_errors_are_reported_correctly(sync_client):
323322
index="i",
324323
mappings={"properties": {"a": {"type": "integer"}}},
325324
)
326-
sync_client.cluster.health(wait_for_status="yellow")
327325

328326
success, failed = helpers.bulk(
329327
sync_client,
@@ -347,7 +345,6 @@ def test_error_is_raised(sync_client):
347345
index="i",
348346
mappings={"properties": {"a": {"type": "integer"}}},
349347
)
350-
sync_client.cluster.health(wait_for_status="yellow")
351348

352349
with pytest.raises(helpers.BulkIndexError):
353350
helpers.bulk(
@@ -393,7 +390,6 @@ def test_errors_are_collected_properly(sync_client):
393390
index="i",
394391
mappings={"properties": {"a": {"type": "integer"}}},
395392
)
396-
sync_client.cluster.health(wait_for_status="yellow")
397393

398394
success, failed = helpers.bulk(
399395
sync_client,

test_elasticsearch_serverless/test_server/test_mapbox_vector_tile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def mvt_setup(sync_client):
7171

7272

7373
@pytest.mark.parametrize("node_class", ["urllib3", "requests"])
74-
def test_mapbox_vector_tile_error(elasticsearch_url, mvt_setup, node_class, ca_certs):
75-
client = Elasticsearch(elasticsearch_url, node_class=node_class, ca_certs=ca_certs)
74+
def test_mapbox_vector_tile_error(elasticsearch_url, mvt_setup, node_class):
75+
client = Elasticsearch(elasticsearch_url, node_class=node_class)
7676
client.search_mvt(
7777
index="museums",
7878
zoom=13,
@@ -113,14 +113,14 @@ def test_mapbox_vector_tile_error(elasticsearch_url, mvt_setup, node_class, ca_c
113113

114114
@pytest.mark.parametrize("node_class", ["urllib3", "requests"])
115115
def test_mapbox_vector_tile_response(
116-
elasticsearch_url, mvt_setup, node_class, ca_certs
116+
elasticsearch_url, mvt_setup, node_class
117117
):
118118
try:
119119
import mapbox_vector_tile
120120
except ImportError:
121121
return pytest.skip("Requires the 'mapbox-vector-tile' package")
122122

123-
client = Elasticsearch(elasticsearch_url, node_class=node_class, ca_certs=ca_certs)
123+
client = Elasticsearch(elasticsearch_url, node_class=node_class)
124124

125125
resp = client.search_mvt(
126126
index="museums",

0 commit comments

Comments
 (0)