Develop#36
Conversation
henrikhimself
commented
Jan 19, 2026
- Improve REVERSEPROXY_HOME.
- Added test collection for environment‑variable tests
- Fix missing Aspire.Hosting reference in Aspire extension project.
There was a problem hiding this comment.
Pull request overview
This PR updates the REVERSEPROXY_HOME environment variable handling to require explicit configuration (throwing an exception instead of falling back to the user home directory), adds test infrastructure for environment variable tests, and fixes missing Aspire.Hosting package references.
Changes:
- Modified REVERSEPROXY_HOME handling to throw an exception when the environment variable is not set, instead of falling back to the user home directory
- Added "EnvironmentVariable" test collection attribute to CertificateConfigTests to prevent parallel test execution when manipulating environment variables
- Fixed Aspire extension project by changing SDK from Aspire.AppHost.Sdk to Microsoft.NET.Sdk and adding explicit Aspire.Hosting package reference
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ReverseProxy/Certificate/CertificateConfig.cs | Changed REVERSEPROXY_HOME token expansion to throw exception instead of falling back to user home directory |
| test/ReverseProxy.UnitTest/Certificate/CertificateConfigTests.cs | Updated tests to reflect new behavior, added Collection attribute, and improved test cleanup |
| src/ReverseProxy/ReverseProxy.csproj | Version bump from beta5 to beta6 |
| src/ReverseProxy.Aspire/ReverseProxy.Aspire.csproj | Changed SDK to Microsoft.NET.Sdk, added Aspire.Hosting package reference, and version bump |
| src/ReverseProxy.Aspire/ResourceBuilderExtensions.cs | Added required using statements for Aspire namespaces |
| examples/Aspire.Website/Views/Home/Index.cshtml | Simplified hosts file mapping instructions |
| Directory.Packages.props | Added Aspire.Hosting version and reordered package entries alphabetically |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| namespace Hj.ReverseProxy.UnitTest.Certificate; | ||
|
|
||
| [Collection("EnvironmentVariable")] |
There was a problem hiding this comment.
The Collection attribute references "EnvironmentVariable" but there is no corresponding CollectionDefinition class defined in the test project. In xUnit, when using the Collection attribute, you need to define a collection definition class with the matching name. Without the definition, this attribute has no effect and tests may run in parallel, potentially causing race conditions when manipulating environment variables.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>