Skip to content

Commit 407983c

Browse files
committed
build: restore root test compatibility after uv migration
Signed-off-by: Dmitrii Cherkasov <dmitrii.cherkasov@oracle.com>
1 parent 95b6f14 commit 407983c

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/workflows/run-unittests-py310-py311.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
- name: "Run unitary tests folder with maximum ADS dependencies"
8585
timeout-minutes: 60
8686
shell: bash
87+
env:
88+
CONDA_PREFIX: /usr/share/miniforge
8789
run: |
8890
set -x # print commands that are executed
8991

.github/workflows/run-unittests-py39-cov-report.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ jobs:
7878
- name: "Run unitary tests folder with maximum ADS dependencies"
7979
timeout-minutes: 60
8080
shell: bash
81+
env:
82+
CONDA_PREFIX: /usr/share/miniforge
8183
run: |
8284
set -x # print commands that are executed
8385

ads/common/auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,18 +1047,18 @@ def __enter__(self):
10471047
If 'profile' not provided, authentication method will be 'resource_principal'.
10481048
"""
10491049
if self.profile:
1050-
ads.set_auth(auth=AuthType.API_KEY, profile=self.profile)
1050+
set_auth(auth=AuthType.API_KEY, profile=self.profile)
10511051
logger.debug(f"OCI profile set to {self.profile}")
10521052
else:
1053-
ads.set_auth(auth=AuthType.RESOURCE_PRINCIPAL)
1053+
set_auth(auth=AuthType.RESOURCE_PRINCIPAL)
10541054
logger.debug("OCI auth set to resource principal")
10551055
return self
10561056

10571057
def __exit__(self, exc_type, exc_val, exc_tb):
10581058
"""
10591059
When called by the 'with' statement restores initial state of authentication type and profile value.
10601060
"""
1061-
ads.set_auth(auth=self.prev_mode, profile=self.prev_profile)
1061+
set_auth(auth=self.prev_mode, profile=self.prev_profile)
10621062

10631063

10641064
class AuthContext:

tests/unitary/default_setup/telemetry/test_telemetry_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# Copyright (c) 2024, 2025 Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
4+
from urllib.parse import unquote
45
from unittest.mock import patch
56

67
import oci
@@ -56,14 +57,14 @@ def test_telemetry_client_record_event(self, signer, request_call):
5657
args, _ = request_call.call_args_list[0]
5758
request: oci.request.Request = args[0]
5859
operation = args[2]
59-
assert request.url == expected_url
60+
assert unquote(request.url) == expected_url
6061
assert operation == "head_object"
6162
assert request.header_params["user-agent"] == expected_agent_headers[0]
6263

6364
# Event #2, with user-agent
6465
args, _ = request_call.call_args_list[1]
6566
request: oci.request.Request = args[0]
6667
operation = args[2]
67-
assert request.url == expected_url
68+
assert unquote(request.url) == expected_url
6869
assert operation == "head_object"
6970
assert request.header_params["user-agent"] == expected_agent_headers[1]

0 commit comments

Comments
 (0)