Marcel Telka
2024-03-28 8d9f476ec7f10b78fa896436bc3df54458cf6879
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
es_url() pollutes the output with diagnostic messages when it is unable to
connect.  Since we do not have the search engine packaged we simply skip all
tests that needs the engine.
 
--- elasticsearch-py-8.13.0/test_elasticsearch/conftest.py.orig
+++ elasticsearch-py-8.13.0/test_elasticsearch/conftest.py
@@ -26,10 +26,7 @@
 
 @pytest.fixture(scope="session")
 def elasticsearch_url():
-    try:
-        return es_url()
-    except RuntimeError as e:
-        pytest.skip(str(e))
+    pytest.skip("Needs the search engine")
 
 
 @pytest.fixture(scope="session")
--- elasticsearch-py-8.13.0/test_elasticsearch/test_server/test_rest_api_spec.py.orig
+++ elasticsearch-py-8.13.0/test_elasticsearch/test_server/test_rest_api_spec.py
@@ -30,6 +30,7 @@
 from typing import Tuple, Union
 
 import pytest
+pytest.skip("Needs the search engine", allow_module_level=True)
 import urllib3
 import yaml