diff options
| author | JPVenson <github@jpb.email> | 2025-04-28 03:18:08 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-27 18:18:08 -0600 |
| commit | e66c76fc3405512b90735b5669278410f7974b1f (patch) | |
| tree | b7329723558336c991524ee1d768ecf2af93be58 /tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs | |
| parent | 1c4b5199b8fa42dd41d6d779db98650a460c7117 (diff) | |
Unified migration handling (#13950)
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs b/tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs index a7fec2960..c09bce52d 100644 --- a/tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs +++ b/tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs @@ -6,6 +6,7 @@ using Emby.Server.Implementations; using Jellyfin.Server.Extensions; using Jellyfin.Server.Helpers; using MediaBrowser.Common; +using MediaBrowser.Common.Configuration; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.Configuration; @@ -103,7 +104,11 @@ namespace Jellyfin.Server.Integration.Tests var host = builder.Build(); var appHost = (TestAppHost)host.Services.GetRequiredService<IApplicationHost>(); appHost.ServiceProvider = host.Services; + var applicationPaths = appHost.ServiceProvider.GetRequiredService<IApplicationPaths>(); + Program.ApplyStartupMigrationAsync((ServerApplicationPaths)applicationPaths, appHost.ServiceProvider.GetRequiredService<IConfiguration>()).GetAwaiter().GetResult(); + Program.ApplyCoreMigrationsAsync(appHost.ServiceProvider, Migrations.Stages.JellyfinMigrationStageTypes.CoreInitialisaition).GetAwaiter().GetResult(); appHost.InitializeServices(Mock.Of<IConfiguration>()).GetAwaiter().GetResult(); + Program.ApplyCoreMigrationsAsync(appHost.ServiceProvider, Migrations.Stages.JellyfinMigrationStageTypes.AppInitialisation).GetAwaiter().GetResult(); host.Start(); appHost.RunStartupTasksAsync().GetAwaiter().GetResult(); |
