diff options
| author | Kefia-02 <yoshimtsu4432@gmail.com> | 2026-11-29 19:01:43 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-29 11:01:43 +0100 |
| commit | ce2884c0efbe3e973d757504a418900fc83671b5 (patch) | |
| tree | e9ed51d1072cbfb432f2884849cb99037b548557 /tests | |
| parent | 51a3e2d462f9417ab9302b07e220b3eceb503143 (diff) | |
Fix superseded plugins being reactivated during catalog refresh (#18773)
* fix(plugins): preserve superseded status during catalog refresh
* fix(plugins): exclude superseded versions from update candidates
* test(plugins): cover superseded status after catalog refresh
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/Plugins/PluginManagerTests.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/Plugins/PluginManagerTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Plugins/PluginManagerTests.cs index ee41b968e1..9c50c5b1ac 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Plugins/PluginManagerTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/Plugins/PluginManagerTests.cs @@ -239,6 +239,28 @@ namespace Jellyfin.Server.Implementations.Tests.Plugins Assert.Equivalent(expectedManifest, result); } + [Theory] + [InlineData(PluginStatus.Active)] + [InlineData(PluginStatus.Disabled)] + [InlineData(PluginStatus.Superseded)] + public async Task PopulateManifest_CatalogRefresh_PreservesPersistedStatus(PluginStatus status) + { + var packageInfo = GenerateTestPackage(); + var pluginManager = new PluginManager(new NullLogger<PluginManager>(), null!, null!, null!, new Version(1, 0)); + var manifest = new PluginManifest + { + Id = packageInfo.Id, + Name = packageInfo.Name, + Version = packageInfo.Versions[0].Version, + Status = status + }; + + Assert.True(pluginManager.SaveManifest(manifest, _pluginPath)); + Assert.True(await pluginManager.PopulateManifest(packageInfo, new Version(1, 0), _pluginPath, status)); + + Assert.Equal(status, pluginManager.LoadManifest(_pluginPath).Manifest.Status); + } + [Fact] public async Task PopulateManifest_ExistingImage_IsNotDownloaded() { |
