File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
tests/unitary/default_setup/auth Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,11 @@ def set_auth(
200200 """
201201 signer_kwargs = signer_kwargs or {}
202202 client_kwargs = {
203- "service_endpoint" : OCI_ODSC_SERVICE_ENDPOINT ,
203+ ** (
204+ {"service_endpoint" : OCI_ODSC_SERVICE_ENDPOINT }
205+ if OCI_ODSC_SERVICE_ENDPOINT
206+ else {}
207+ ),
204208 ** (client_kwargs or {}),
205209 }
206210
@@ -498,7 +502,12 @@ def default_signer(client_kwargs: Optional[Dict] = None) -> Dict:
498502 >>> auth = ads.auth.default_signer() # signer_callable instantiated
499503 >>> oc.OCIClientFactory(**auth).object_storage # Creates Object storage client using instance principal authentication
500504 """
501- default_client_kwargs = {"service_endpoint" : OCI_ODSC_SERVICE_ENDPOINT }
505+ default_client_kwargs = (
506+ {"service_endpoint" : OCI_ODSC_SERVICE_ENDPOINT }
507+ if OCI_ODSC_SERVICE_ENDPOINT
508+ else {}
509+ )
510+
502511 auth_state = AuthState ()
503512 if auth_state .oci_signer or auth_state .oci_signer_callable :
504513 configuration = ads .telemetry .update_oci_client_config (auth_state .oci_config )
Original file line number Diff line number Diff line change 44# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
55
66import os
7- from mock import MagicMock
87import pytest
98from unittest import TestCase , mock
109
You can’t perform that action at this time.
0 commit comments