Documentation
¶
Overview ¶
Package conformance checks that a source plugin follows the panelarr.source.v1 protocol. For each source it walks list → popular → latest → search → details → chapters → pages → image, and it checks the plugin's info, configuration, health, capabilities and error mapping.
Problems are protocol violations: a conformant plugin has none. A source whose site is down is not a protocol violation, so failing steps are reported per source, and only a malformed answer or error is a problem.
Run it from a plugin's own tests with Run, against any client with Check, or from the command line with source-conformance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Config is applied with SetConfig before anything else, e.g. to point
// the plugin at a test server. Only for plugins with a config schema.
Config map[string]any
// SourceIDs limits the walk to these sources. Empty means all.
SourceIDs []string
// MaxSources limits the walk to the first n sources. 0 means all.
MaxSources int
// SearchQuery is searched on every source that can search. Empty means
// the title of the source's first popular series, which then should be
// found.
SearchQuery string
// SkipImages skips FetchImage.
SkipImages bool
// PackageID, for plugins with the PACKAGES capability, is a package to
// install, narrow to one language, restore and (if it wasn't installed)
// uninstall again. Without it the package checks only read.
PackageID string
// Timeout bounds the whole check. Default 5 minutes.
Timeout time.Duration
}
Options select what to exercise.
type Report ¶
type Report struct {
Info *sourcev1.PluginInfo
// Problems break the protocol. A conformant plugin has none.
Problems []string
// Warnings are likely mistakes that don't break the protocol.
Warnings []string
// Sources are the walks of the checked sources.
Sources []*SourceReport
// Packages is how many packages ListPackages returned (PACKAGES plugins).
Packages int
// Jobs is how many jobs ListJobs returned (JOBS plugins).
Jobs int
// PackageSteps is the install walk of Options.PackageID.
PackageSteps []Step
}
Report is what Check found.
func Check ¶
Check runs the checks. The error is for failures to run them at all (e.g. the plugin can't be reached); protocol violations go to the report.
type SourceReport ¶
SourceReport is the walk through one source.
func (*SourceReport) OK ¶
func (s *SourceReport) OK() bool
OK reports whether every step that ran passed.