mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Fix tests
This commit is contained in:
parent
0f46eca6a4
commit
033ffa9a88
@ -185,11 +185,7 @@ namespace Jellyfin.Server
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var host = Host.CreateDefaultBuilder()
|
var host = Host.CreateDefaultBuilder()
|
||||||
.ConfigureServices(services =>
|
.ConfigureServices(services => appHost.Init(services))
|
||||||
{
|
|
||||||
// NOTE: Called first to ensure app host configuration is fully initialized
|
|
||||||
appHost.Init(services);
|
|
||||||
})
|
|
||||||
.ConfigureWebHostDefaults(webHostBuilder => webHostBuilder.ConfigureWebHostBuilder(appHost, startupConfig, appPaths))
|
.ConfigureWebHostDefaults(webHostBuilder => webHostBuilder.ConfigureWebHostBuilder(appHost, startupConfig, appPaths))
|
||||||
.ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(options, appPaths, startupConfig))
|
.ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(options, appPaths, startupConfig))
|
||||||
.UseSerilog()
|
.UseSerilog()
|
||||||
|
@ -8,6 +8,7 @@ using MediaBrowser.Common;
|
|||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc.Testing;
|
using Microsoft.AspNetCore.Mvc.Testing;
|
||||||
using Microsoft.AspNetCore.TestHost;
|
using Microsoft.AspNetCore.TestHost;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
@ -78,11 +79,17 @@ namespace Jellyfin.Server.Integration.Tests
|
|||||||
commandLineOpts,
|
commandLineOpts,
|
||||||
startupConfig);
|
startupConfig);
|
||||||
_disposableComponents.Add(appHost);
|
_disposableComponents.Add(appHost);
|
||||||
var serviceCollection = new ServiceCollection();
|
|
||||||
appHost.Init(serviceCollection);
|
|
||||||
|
|
||||||
// Configure the web host builder
|
builder.ConfigureServices(services => appHost.Init(services))
|
||||||
Program.ConfigureWebHostBuilder(builder, appHost, startupConfig, appPaths);
|
.ConfigureWebHostBuilder(appHost, startupConfig, appPaths)
|
||||||
|
.ConfigureAppConfiguration((context, builder) =>
|
||||||
|
{
|
||||||
|
builder
|
||||||
|
.SetBasePath(appPaths.ConfigurationDirectoryPath)
|
||||||
|
.AddInMemoryCollection(ConfigurationOptions.DefaultConfiguration)
|
||||||
|
.AddEnvironmentVariables("JELLYFIN_")
|
||||||
|
.AddInMemoryCollection(commandLineOpts.ConvertToConfig());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
|
Loading…
Reference in New Issue
Block a user