fix(gateway): harden self-signed cert persistence and config validation
This commit is contained in:
@@ -56,4 +56,13 @@ public sealed class GatewayOptionsValidatorTests
|
||||
Assert.True(result.Failed);
|
||||
Assert.Contains(result.Failures!, f => f.Contains("MxGateway:Tls:AdditionalDnsNames"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Validate_Fails_WhenSelfSignedCertPathBlank()
|
||||
{
|
||||
GatewayOptions options = CloneWithTls(ValidOptions(), new TlsOptions { SelfSignedCertPath = " " });
|
||||
ValidateOptionsResult result = new GatewayOptionsValidator().Validate(null, options);
|
||||
Assert.True(result.Failed);
|
||||
Assert.Contains(result.Failures!, f => f.Contains("MxGateway:Tls:SelfSignedCertPath must not be blank."));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user