[PR #5341] [CLOSED] POC: Permit plugin testing to be included within the unit tests. #10491

Closed
opened 2026-02-07 06:21:20 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/5341
Author: @BaronGreenback
Created: 3/1/2021
Status: Closed

Base: masterHead: PluginTests


📝 Commits (1)

📊 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.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/5341 **Author:** [@BaronGreenback](https://github.com/BaronGreenback) **Created:** 3/1/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `PluginTests` --- ### 📝 Commits (1) - [`5ffe7bf`](https://github.com/jellyfin/jellyfin/commit/5ffe7bf21b45a097edb80ccc522b3a13398bc51c) PluginTester ### 📊 Changes **4 files changed** (+114 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:21:20 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10491