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(
200
200
"""
201
201
signer_kwargs = signer_kwargs or {}
202
202
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
+ ),
204
208
** (client_kwargs or {}),
205
209
}
206
210
@@ -498,7 +502,12 @@ def default_signer(client_kwargs: Optional[Dict] = None) -> Dict:
498
502
>>> auth = ads.auth.default_signer() # signer_callable instantiated
499
503
>>> oc.OCIClientFactory(**auth).object_storage # Creates Object storage client using instance principal authentication
500
504
"""
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
+
502
511
auth_state = AuthState ()
503
512
if auth_state .oci_signer or auth_state .oci_signer_callable :
504
513
configuration = ads .telemetry .update_oci_client_config (auth_state .oci_config )
Original file line number Diff line number Diff line change 4
4
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
5
5
6
6
import os
7
- from mock import MagicMock
8
7
import pytest
9
8
from unittest import TestCase , mock
10
9
You can’t perform that action at this time.
0 commit comments