23 lines
735 B
C#
23 lines
735 B
C#
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);
|
|
}
|
|
}
|