Pin Vite to 5173 without an Aspire proxy so AppHost can start.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user