Repository navigation
Bind Dashboard integration test listeners to loopback - #22710
James Newton-King (JamesNK) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22710Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22710" |
Tests selector1 / 101 PR test projects · 0 PR jobs, from 3 changed files. Selected PR test projects (1 / 101)
Selected PR jobs (0)none How these were chosen — grouped by what changed🧪 🧪 🧪 Job reasonsnone Selection computed for commit |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the integration-test loopback-binding changes.
No open issues 🎉
What changed in this PR
This PR limits selected Dashboard integration-test listeners to loopback to avoid Windows Firewall prompts, while preserving wildcard URL configuration for endpoint-reporting coverage. Production behavior is unchanged.
Changes:
- Adds a shared helper that binds wildcard Kestrel sockets to loopback.
- Updates startup tests to verify assigned ports and preserved wildcard configuration.
- Updates browser-token tests to verify loopback binding and matching login-link ports.
| File | Description |
|---|---|
| tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs | Applies loopback binding and updates endpoint assertions. |
| tests/Aspire.Dashboard.Tests/Integration/IntegrationTestHelpers.cs | Adds the shared wildcard-to-loopback socket-binding helper. |
| tests/Aspire.Dashboard.Tests/Integration/FrontendBrowserTokenAuthTests.cs | Applies the helper and verifies login-link ports match bound endpoints. |
Review effort: Balanced
Description
Some Dashboard integration tests listen on all network interfaces, which can trigger a Windows Firewall prompt during local test runs even though the tests don't need inbound connections from other machines.
Keep the wildcard URLs in the test configuration so that the Dashboard still exercises endpoint reporting, but bind the underlying Kestrel sockets to loopback. The tests still use real dynamically assigned ports and verify endpoint accessors, OTLP addresses, and browser-token login URLs. Production behavior and firewall settings are unchanged.
Validation
14 targeted cases passed on Windows; no failures or skips:
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?