Remove support for local client in testing. (#573)
Signed-off-by: dblock <[email protected]>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user