Fix test to handle markdown-formatted resource names in deployment messages #12206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the failing test
Aspire.Hosting.Azure.Tests.AzureDeployerTests.DeployAsync_ShowsEndpointOnlyForExternalEndpointsby updating assertions to handle both plain and markdown-formatted resource names.Problem
The test was consistently failing in CI with the following error:
The test was expecting plain text resource names in deployment completion messages, but in certain environments (particularly CI), the resource names were being wrapped with markdown bold formatting (
**).Solution
Updated the test assertions to use regex pattern matching instead of exact string comparison. This allows the test to pass regardless of whether the resource names are plain text or markdown-formatted:
The regex pattern
\*?\*?internal-api\*?\*?matches:Successfully deployed internal-api(plain format)Successfully deployed **internal-api**(markdown bold format)Testing
AzureDeployerTestspass successfullyThis fix makes the test more resilient to formatting variations while still validating the core behavior: that internal containers don't display URLs in their completion messages, while external containers do.
Fixes #[issue-number-from-tracking-system]
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
aka.ms/usr/local/bin/bicep build /tmp/aspiremXUa8t/env.module.bicep --stdout(dns block)/usr/local/bin/bicep build /tmp/aspireNOqLnn/external-api.module.bicep --stdout(dns block)/usr/local/bin/bicep build /tmp/aspirebQFKGp/worker.module.bicep --stdout(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Fixes #12203
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.