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 PershinandCursor committed 2026-08-20 10:14:26 +03:00
1 parent 3bb5d45f10
commit 7851bed14f
4 files changed
+65 -2

No files matched your search

@@ -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);
}
}