plugintest

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureLogOutput

func CaptureLogOutput(t *testing.T, fn func()) string

func LoadJSONFile

func LoadJSONFile[T any](t *testing.T, dir, filename string) T

func LoadPluginReport

func LoadPluginReport(t *testing.T, serviceDir, pluginName string) ci.Report

func LoadReport

func LoadReport(t *testing.T, serviceDir, filename string) ci.Report

func MustRuntime

func MustRuntime[T any](t *testing.T, provider plugin.RuntimeProvider, appCtx *plugin.AppContext) T

func NewAppContext

func NewAppContext(t *testing.T, workDir string) *plugin.AppContext

Types

type StubChangeDetector

type StubChangeDetector struct {
	StubPlugin
	ChangedModules   []*discovery.Module
	ChangedFiles     []string
	ChangedLibraries []string
	Err              error
}

StubChangeDetector implements ChangeDetectionProvider for testing.

func (*StubChangeDetector) DetectChangedLibraries

func (d *StubChangeDetector) DetectChangedLibraries(_ context.Context, _ *plugin.AppContext, _ string, _ []string) ([]string, error)

func (*StubChangeDetector) DetectChangedModules

func (d *StubChangeDetector) DetectChangedModules(_ context.Context, _ *plugin.AppContext, _ string, _ *discovery.ModuleIndex) ([]*discovery.Module, []string, error)

type StubConfig

type StubConfig struct {
	Enabled bool
}

StubConfig is a minimal config struct for testing.

type StubConfigPlugin

type StubConfigPlugin struct {
	plugin.BasePlugin[*StubConfig]
}

StubConfigPlugin embeds BasePlugin for testing config-aware scenarios.

type StubPlugin

type StubPlugin struct {
	NameVal string
	DescVal string
}

StubPlugin is a minimal Plugin implementation for testing.

func (*StubPlugin) Description

func (p *StubPlugin) Description() string

func (*StubPlugin) Name

func (p *StubPlugin) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL