Skip to content

Commit

Permalink
Remove support for local client in testing. (#573)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Nov 12, 2023
1 parent 7878364 commit e079c00
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions test_opensearchpy/test_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from opensearchpy.helpers import test
from opensearchpy.helpers.test import OpenSearchTestCase as BaseTestCase

client = None
client: Any = None


def get_client(**kwargs: Any) -> Any:
Expand All @@ -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
Expand Down

0 comments on commit e079c00

Please sign in to comment.