PYTHON-4439 Use environment variable to detect dataLake test (#1637)

This commit is contained in:
Steven Silvester 2024-05-13 14:14:47 -05:00 committed by GitHub
parent da03da34c6
commit 3004523ab0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -352,8 +352,7 @@ class ClientContext:
if self.client is not None:
# Return early when connected to dataLake as mongohoused does not
# support the getCmdLineOpts command and is tested without TLS.
build_info: Any = self.client.admin.command("buildInfo")
if "dataLake" in build_info:
if os.environ.get("TEST_DATA_LAKE"):
self.is_data_lake = True
self.auth_enabled = True
self.client = self._connect(host, port, username=db_user, password=db_pwd)