Skip to content

Commit 1a38688

Browse files
committed
Fix unit test
Signed-off-by: Victor Chang <[email protected]>
1 parent 85aef56 commit 1a38688

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/InformaticsGateway/Test/Services/Http/StartupTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
using System.Threading.Tasks;
1818
using Microsoft.AspNetCore.Hosting;
19+
using Microsoft.Extensions.DependencyInjection;
1920
using Monai.Deploy.InformaticsGateway.Services.Http;
21+
using Monai.Deploy.Security.Authentication.Configurations;
2022
using Xunit;
2123

2224
namespace Monai.Deploy.InformaticsGateway.Test.Services.Http
@@ -28,6 +30,10 @@ public async Task Startup_WebHostBuildsProperly()
2830
{
2931
var webHost = Microsoft.AspNetCore.WebHost.CreateDefaultBuilder()
3032
.UseEnvironment("Development")
33+
.ConfigureServices((hostContext, services) =>
34+
{
35+
services.AddOptions<AuthenticationOptions>().Bind(hostContext.Configuration.GetSection("MonaiDeployAuthentication"));
36+
})
3137
.UseStartup<Startup>()
3238
.Build();
3339
Assert.NotNull(webHost);

src/InformaticsGateway/Test/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"MonaiDeployAuthentication": {
3-
"BypassAuthentication": true
3+
"bypassAuthentication": true
44
},
55
"ConnectionStrings": {
66
"Type": "Sqlite",

0 commit comments

Comments
 (0)