fix(router): ship audit bundle frontdoor cutover

This commit is contained in:
master
2026-03-08 14:30:12 +02:00
parent 8852928115
commit 30532800ec
9 changed files with 367 additions and 16 deletions

View File

@@ -313,6 +313,30 @@ public sealed class GatewayOptionsValidatorTests
Assert.Contains("regex", exception.Message, StringComparison.OrdinalIgnoreCase);
}
[Fact]
public void Validate_DuplicateExactRoutePath_Throws()
{
var options = CreateValidOptions();
options.Routes.Add(new StellaOpsRoute
{
Type = StellaOpsRouteType.ReverseProxy,
Path = "/v1/audit-bundles",
TranslatesTo = "http://exportcenter.stella-ops.local/v1/audit-bundles"
});
options.Routes.Add(new StellaOpsRoute
{
Type = StellaOpsRouteType.ReverseProxy,
Path = "/v1/audit-bundles",
TranslatesTo = "http://evidencelocker.stella-ops.local/v1/audit-bundles"
});
var exception = Assert.Throws<InvalidOperationException>(() =>
GatewayOptionsValidator.Validate(options));
Assert.Contains("Duplicate route path", exception.Message, StringComparison.OrdinalIgnoreCase);
Assert.Contains("/v1/audit-bundles", exception.Message, StringComparison.OrdinalIgnoreCase);
}
[Fact]
public void Validate_ValidRegex_DoesNotThrow()
{