diff --git a/sdk/identity/azure-identity/tests/integration/azure-kubernetes-service/Dockerfile b/sdk/identity/azure-identity/tests/integration/azure-kubernetes-service/Dockerfile index 790d38d8b5ea..e562ea81a390 100644 --- a/sdk/identity/azure-identity/tests/integration/azure-kubernetes-service/Dockerfile +++ b/sdk/identity/azure-identity/tests/integration/azure-kubernetes-service/Dockerfile @@ -13,7 +13,7 @@ RUN apk --no-cache add git RUN git clone https://github.com/Azure/azure-sdk-for-python --single-branch --depth 1 /azure-sdk-for-python -FROM python:3.11-slim +FROM mcr.microsoft.com/mirror/docker/library/python:3.11-slim COPY --from=repo /azure-sdk-for-python/sdk/identity /sdk/identity COPY --from=repo /azure-sdk-for-python/sdk/core/azure-core /sdk/core/azure-core diff --git a/sdk/identity/azure-identity/tests/integration/test_azure_kubernetes_service.py b/sdk/identity/azure-identity/tests/integration/test_azure_kubernetes_service.py index ff233a8938b4..cd72185180c1 100644 --- a/sdk/identity/azure-identity/tests/integration/test_azure_kubernetes_service.py +++ b/sdk/identity/azure-identity/tests/integration/test_azure_kubernetes_service.py @@ -57,5 +57,5 @@ def test_azure_kubernetes(self): pod_output = run_command([kubectl_path, "get", "pods", "-o", "jsonpath='{.items[0].metadata.name}'"]) assert pod_name in pod_output - output = run_command([kubectl_path, "exec", pod_name, "--", "python", "/app.py"]) + output = run_command([kubectl_path, "exec", pod_name, "--", "python3", "/app.py"]) assert "Passed!" in output diff --git a/sdk/identity/test-resources-pre.ps1 b/sdk/identity/test-resources-pre.ps1 index 47dc8d7a274a..c943e032d29b 100644 --- a/sdk/identity/test-resources-pre.ps1 +++ b/sdk/identity/test-resources-pre.ps1 @@ -48,6 +48,11 @@ $templateFileParameters['sshPubKey'] = $sshKey Write-Host "Sleeping for a bit to ensure service principal is ready." Start-Sleep -s 45 +# Install this specific version of the Azure CLI to avoid https://github.com/Azure/azure-cli/issues/28358. +pip install azure-cli=="2.56.0" + +$az_version = az version +Write-Host "Azure CLI version: $az_version" az login --service-principal -u $TestApplicationId -p $TestApplicationSecret --tenant $TenantId az account set --subscription $SubscriptionId $versions = az aks get-versions -l westus -o json | ConvertFrom-Json