Add ACR purge task deployment E2E test#14738
Conversation
Add a deployment test that validates the WithPurgeTask and GetAzureContainerRegistry APIs end-to-end against real Azure infrastructure. The test: 1. Creates a Python FastAPI/React starter template 2. Adds ACA environment with a purge task (every minute, keep 1) 3. Deploys twice to push multiple image tags 4. Runs the purge task via az acr task run 5. Verifies only 1 tag remains per repository Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/deployment-test |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14738Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14738" |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #14738... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive end-to-end test for the ACR purge task feature introduced in PR #14683. The test validates that the WithPurgeTask and GetAzureContainerRegistry APIs work correctly in a real Azure deployment scenario by deploying a Python FastAPI application twice, running the purge task, and verifying that old container images are cleaned up according to the configured retention policy.
Changes:
- Adds
AcrPurgeTaskDeploymentTests.cswith a complete E2E test that creates a Python starter project, deploys it twice to Azure Container Apps with ACR purge configured, manually triggers the purge task, and verifies only 1 tag remains per repository
|
❌ Deployment E2E Tests failed Summary: 24 passed, 1 failed, 0 cancelled Passed Tests
Failed Tests
🎬 Terminal Recordings
|
Description
Add a deployment E2E test for the
WithPurgeTaskandGetAzureContainerRegistryAPIs added in #14683.The test validates the ACR purge task feature end-to-end against real Azure infrastructure:
aspire new.GetAzureContainerRegistry().WithPurgeTask("* * * * *", keep: 1)az acr task run --name purgeOldImages --registry <name>Fixes # (issue)
Checklist