Remove support for local client in testing. (#573)

Signed-off-by: dblock <[email protected]>
This commit is contained in:
Daniel (dB.) Doubrovkine
2023-11-12 08:35:06 -08:00
committed by GitHub
parent 7878364cf0
commit e079c00b48
+5 -12
View File
@@ -32,7 +32,7 @@ from unittest import SkipTest
from opensearchpy.helpers import test
from opensearchpy.helpers.test import OpenSearchTestCase as BaseTestCase
client = None
client: Any = None
def get_client(**kwargs: Any) -> Any:
@@ -42,18 +42,11 @@ def get_client(**kwargs: Any) -> Any:
if client is not None and not kwargs:
return client
# try and locate manual override in the local environment
try:
from test_opensearchpy.local import get_client as local_get_client
new_client = local_get_client(**kwargs)
except ImportError:
# fallback to using vanilla client
try:
new_client = test.get_test_client(**kwargs)
except SkipTest:
client = False
raise
new_client = test.get_test_client(**kwargs)
except SkipTest:
client = False
raise
if not kwargs:
client = new_client