fix(router): ship audit bundle frontdoor cutover
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user