mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #5341] [CLOSED] POC: Permit plugin testing to be included within the unit tests. #10491
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/5341
Author: @BaronGreenback
Created: 3/1/2021
Status: ❌ Closed
Base:
master← Head:PluginTests📝 Commits (1)
5ffe7bfPluginTester📊 Changes
4 files changed (+114 additions, -0 deletions)
View changed files
📝
Jellyfin.Api/Controllers/PluginsController.cs(+37 -0)📝
MediaBrowser.Common/Plugins/BasePlugin.cs(+11 -0)📝
MediaBrowser.Common/Plugins/IPlugin.cs(+7 -0)➕
tests/Jellyfin.Api.Tests/PluginControllerTest.cs(+59 -0)📄 Description
This method does have many flaws, but as a starter, it's minimal and it would at least permit some form of testing.
Plugins
The plugin designer uses a new method IPlugin.SelfTest to implement their tests.
Tests return a success state together with an optional string.
Jellyfin
A new API function calls the plugin's SelfTest function and returns the success/state.
The test unit controller, retrieves a list of all plugins installed, and enumerates each one, calling the new API.
Any API that fails results in the unit failing.
Code
This code does not fully function, but is a concept idea.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.