forked from dotnet/aspire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add README.md for Shared/RepoTesting
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Running tests outside-of-repo | ||
|
||
This provides support for running tests outside of the repo, for example on a helix agent. | ||
- For this you need the source of the tests, and any dependencies. | ||
- Instead of direct `ProjectReferences` to the various Aspire hosting, and component projects use | ||
`@(ComponentReferenceForTests)`, and @(NonComponentReferenceForTests)`. | ||
- These are converted to `ProjectReference` when `$(TestsRunningOutsideOfRepo) != true`. | ||
- But converted to `PackageReference` when `$(TestsRunningOutsideOfRepo) == true`. | ||
|
||
- To allow building such test projects, the build is isolated and patched to build outside the | ||
repo by adding appropriate `Directory.Build.{props,targets}`, and `Directory.Packages.props` | ||
- and using a custom `nuget.config` which resolves the Aspire packages from the locally built packages | ||
- and a `Directory.Packages.Versions.props` is generated with PackageVersions taken from the repo | ||
- This also adds properties named in `@(PropertyForHelixRun)` from the repo, like `$(NetCurrent)`. | ||
|
||
## Adding new package versions | ||
|
||
Add any new package versions used by test projects in `tests/Shared/RepoTesting/Directory.Packages.Helix.props`. |