Add one-command server and client bootstraps
This commit is contained in:
1 parent
742ae9c2b5
commit
3a10098239
19 files changed
+1569
-37
No files matched your search
@@ -0,0 +1,31 @@
|
||||
using SGU.AuthBroker.Options;
|
||||
using Xunit;
|
||||
|
||||
namespace SGU.AuthBroker.Tests;
|
||||
|
||||
public sealed class BrokerOptionsTests
|
||||
{
|
||||
[Fact]
|
||||
public void ValidateAllowsAnEmptyClientAllowListDuringServerBootstrap()
|
||||
{
|
||||
BrokerOptions options = new();
|
||||
|
||||
options.Validate();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ValidateRejectsAnInvalidConfiguredClientThumbprint()
|
||||
{
|
||||
BrokerOptions options = new()
|
||||
{
|
||||
Tls = new TlsOptions
|
||||
{
|
||||
AllowedClientThumbprints = ["not-a-thumbprint"]
|
||||
}
|
||||
};
|
||||
|
||||
InvalidOperationException exception = Assert.Throws<InvalidOperationException>(options.Validate);
|
||||
|
||||
Assert.Contains("thumbprint", exception.Message, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user