Skip to content

Commit

Permalink
Fixes ClientSecretCredential token issue
Browse files Browse the repository at this point in the history
Signed-off-by: Uday Kurundwade <[email protected]>
  • Loading branch information
udaysk23 authored and openshift-cherrypick-robot committed May 21, 2024
1 parent fa2a2bd commit b3da8ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/manage/mcg/test_azure_noobaa_sa.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def test_tls_version_and_secure_transfer(
"""
azure_depl = AZUREIPI()
token = azure_depl.azure_util.credentials.token["access_token"]
tkn = azure_depl.azure_util.credentials.get_token(
"https://management.azure.com/.default"
)
secret_ocp_obj = OCP(
kind=constants.SECRET, namespace=config.ENV_DATA["cluster_namespace"]
)
Expand All @@ -54,7 +56,7 @@ def test_tls_version_and_secure_transfer(
subscription_id = base64.b64decode(
creds_secret_obj.get("data").get("azure_subscription_id")
).decode("utf-8")
headers = {"Authorization": f"Bearer {token}"}
headers = {"Authorization": f"Bearer {tkn.token}"}
url = (
f"https://management.azure.com/subscriptions/{subscription_id}/"
f"resourceGroups/{resource_group_name}/providers/Microsoft.Storage/"
Expand Down

0 comments on commit b3da8ad

Please sign in to comment.