Pin Vite to 5173 without an Aspire proxy so AppHost can start.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 10:14:26 +03:00
co-authored by Cursor
parent 3bb5d45f10
commit 7851bed14f
4 changed files with 65 additions and 2 deletions
@@ -0,0 +1,22 @@
using Aspire.Hosting.ApplicationModel;
namespace HSchool.AppHost.Tests;
public class ClientEndpointTests
{
[Fact]
public async Task ViteHttpEndpoint_IsProxylessOnPinnedPort()
{
await using var appHost = await DistributedApplicationTestingBuilder
.CreateAsync<Projects.HSchool_AppHost>(TestContext.Current.CancellationToken);
var client = Assert.Single(appHost.Resources, resource => resource.Name == "client");
var http = Assert.Single(
client.Annotations.OfType<EndpointAnnotation>(),
endpoint => endpoint.UriScheme == "http");
Assert.False(http.IsProxied);
Assert.Equal(5173, http.Port);
Assert.Equal(5173, http.TargetPort);
}
}