Skip to content

Conversation

@DeagleGross
Copy link
Member

This PR moves the existing "e2e" tests validating aspire exec scenario, and drops the unwanted dependencies such as playground apps of the Aspire.Cli.Tests project.

Fixes #10421

@DeagleGross DeagleGross requested review from JamesNK and Copilot July 15, 2025 12:26
@DeagleGross DeagleGross requested a review from mitchdenny as a code owner July 15, 2025 12:26
@DeagleGross DeagleGross self-assigned this Jul 15, 2025
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jul 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR restructures and cleans up the end-to-end tests for the aspire exec feature by moving them into the Aspire.Hosting.Tests project and removing the old Aspire.Cli.Tests suite along with unwanted project dependencies.

  • Introduces a new ProjectResourceExecTests class and ExecTestsBase helper in Aspire.Hosting.Tests for backchannel-based exec testing.
  • Deletes the legacy E2E exec tests in tests/Aspire.Cli.Tests/E2E/ExecTests.cs.
  • Cleans up Aspire.Cli.Tests.csproj by removing references to Aspire.TestUtilities and playground apps.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/Aspire.Hosting.Tests/Backchannel/Exec/ProjectResourceExecTests.cs Adds new backchannel-based exec tests for project resources
tests/Aspire.Hosting.Tests/Backchannel/Exec/ExecTestsBase.cs Adds base class for shared exec test logic
tests/Aspire.Cli.Tests/E2E/ExecTests.cs Removes old E2E exec tests and their dependencies
tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj Drops unwanted project references (TestUtilities and playground apps)

@mitchdenny
Copy link
Member

I think we might need a bit more test coverage on the CLI side which simulates various error conditions coming back across a fake backchannel.

If you look at ExecCommand_ExecutesSuccessfully it creates a fake back channel (good) but we aren't using it to simulate various failure states with the exec resource itself and then testing out the CLI behaves.

These new tests without the external project dependency look OK though so I'll approve this PR.

@DeagleGross
Copy link
Member Author

I think we might need a bit more test coverage on the CLI side which simulates various error conditions coming back across a fake backchannel.

i will do in a follow-up pr, merging this to unblock other activities; thanks Mitch!

@DeagleGross DeagleGross merged commit d7be071 into main Jul 15, 2025
545 of 547 checks passed
@DeagleGross DeagleGross deleted the dmkorolev/cli-tests-refactor branch July 15, 2025 23:27
@mitchdenny
Copy link
Member

/backport to release/9.4

@github-actions
Copy link
Contributor

@mitchdenny
Copy link
Member

@DeagleGross need to remember to backport these PRs :)

@github-actions
Copy link
Contributor

@mitchdenny backporting to "release/9.4" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: drop dependencies
Using index info to reconstruct a base tree...
M	tests/Aspire.Cli.Tests/E2E/ExecTests.cs
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): tests/Aspire.Cli.Tests/E2E/ExecTests.cs deleted in drop dependencies and modified in HEAD.  Version HEAD of tests/Aspire.Cli.Tests/E2E/ExecTests.cs left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 drop dependencies
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

mitchdenny pushed a commit that referenced this pull request Jul 19, 2025
davidfowl pushed a commit that referenced this pull request Jul 19, 2025
* drop dependencies (#10422)

* Add missing using.

* Add missing usings.

---------

Co-authored-by: Korolev Dmitry <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages testing ☑️

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aspire.Cli.Tests should not reference playground apps

3 participants