Exclude Aspire.EndToEnd.Tests from macOS CI and guard tests with Docker feature requirement#15501
Exclude Aspire.EndToEnd.Tests from macOS CI and guard tests with Docker feature requirement#15501
Conversation
…re.EndToEnd.Tests Co-authored-by: radical <1472+radical@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/421f8f4c-6f5d-4969-9e76-0e274d38c3ff
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15501Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15501" |
There was a problem hiding this comment.
Pull request overview
Updates the Aspire end-to-end test project to avoid running Docker-dependent tests on macOS GitHub Actions runners (where Docker isn’t available), while still allowing Docker gating via the repo’s RequiresFeature mechanism.
Changes:
- Excludes
Aspire.EndToEnd.Testsfrom macOS GitHub Actions runs via MSBuild property. - Adds
RequiresFeature(TestFeature.Docker)guards to Docker-dependent E2E tests inIntegrationServicesTests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/Aspire.EndToEnd.Tests/IntegrationServicesTests.cs | Adds Docker feature requirement attributes to relevant E2E tests. |
| tests/Aspire.EndToEnd.Tests/Aspire.EndToEnd.Tests.csproj | Disables running this test project on GitHub Actions macOS runners; updates related comment. |
| [Theory] | ||
| [OuterloopTest("EndToEnd tests require Docker and are slow")] | ||
| [RequiresFeature(TestFeature.Docker)] | ||
| [Trait("scenario", "basicservices")] |
There was a problem hiding this comment.
Consider applying RequiresFeature(TestFeature.Docker) at the test class level instead of per-test. That avoids duplication and prevents new tests added to this class from accidentally running on unsupported CI environments if the attribute is forgotten.
| <!-- Only run on Linux; no docker support on Windows/Mac yet --> | ||
| <RunOnGithubActionsWindows>false</RunOnGithubActionsWindows> | ||
| <RunOnGithubActionsMacOS>false</RunOnGithubActionsMacOS> |
There was a problem hiding this comment.
The comment says "no docker support on Windows/Mac yet", but this project property is specifically about where tests run in GitHub Actions. To avoid implying Docker is unsupported on macOS/Windows in general (e.g., local dev), consider wording this as "no Docker support on GitHub Actions Windows/macOS" or "no Docker support on CI Windows/macOS".
Description
End-to-end tests in
Aspire.EndToEnd.Testsrequire Docker, which is unavailable on macOS CI runners. This adds both a project-level CI exclusion and per-test guards.Changes:
Aspire.EndToEnd.Tests.csproj: Added<RunOnGithubActionsMacOS>false</RunOnGithubActionsMacOS>(alongside existing Windows exclusion); updated comment to reflect both platformsIntegrationServicesTests.cs: Added[RequiresFeature(TestFeature.Docker)]toVerifyComponentWorksandVerifyHealthyOnIntegrationServiceA— ensures tests are skipped at runtime on any environment without Docker supportFixes #15500 .
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: