plugintest

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 12 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 ServeInBackground

func ServeInBackground(t *testing.T, config Config)

ServeInBackground serves the plugin in background with the provided configuration. The plugin will be unloaded when the test is over.

Types

type Config

type Config struct {
	// PluginServer is the plugin server implemented by the plugin.
	PluginServer pluginsdk.PluginServer

	// PluginClient is the plugin clients that the test needs have initialized
	// to facilitate testing the plugin implementations. This field is
	// optional.
	PluginClient pluginsdk.PluginClient

	// ServiceServers are the service servers implemented by the plugin. This
	// field is optional.
	ServiceServers []pluginsdk.ServiceServer

	// ServiceClients are the service clients that the test needs have
	// initialized to facilitate testing service implementations on the plugin.
	// This field is optional.
	ServiceClients []pluginsdk.ServiceClient

	// HostServiceServers are the host services that the test wants to offer to
	// the plugin. This field is optional.
	HostServiceServers []pluginsdk.ServiceServer

	// Logger is an optional logger for capturing log events from the plugin.
	// This field is optional.
	Logger hclog.Logger
}

Config is the test configuration for the plugin. It defines which plugin services, and host services are wired up.

Jump to

Keyboard shortcuts

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