pluginkittest

package
v1.5.10 Latest Latest
Warning

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

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

Overview

Package pluginkittest holds the checks every first-party plugin test shares.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContract

func CheckContract(t *testing.T, p pluginkit.Plugin, manifestPath string)

CheckContract validates the manifest on disk and drives Describe, Health and Send through a real gRPC server on a unix socket.

func CheckDNSContract

func CheckDNSContract(t *testing.T, p pluginkit.Plugin, manifestPath string)

CheckDNSContract validates the manifest on disk and drives Describe, Health and a credential-less ListZones through a real gRPC server.

func Event

func Event() *pluginpb.Event

Event is a representative firing alert.

func NoSleep

func NoSleep(context.Context, time.Duration) error

NoSleep makes retries instant in tests.

func RunErrorCases

func RunErrorCases(t *testing.T, send func(serverURL string) pluginkit.Result)

RunErrorCases runs every ErrorCase against send, which must target the server URL it is given.

func ServeDNS

ServeDNS runs p on a unix socket and returns a client for its DNS service and the connection for the plugin service.

func Status

func Status(code int, body string) http.HandlerFunc

Status returns a handler that always answers with code and body.

Types

type ErrorCase

type ErrorCase struct {
	Name      string
	Handler   http.HandlerFunc
	Retryable bool
	Contains  string
}

ErrorCase is one shared HTTP failure every plugin must map the same way.

func ErrorCases

func ErrorCases() []ErrorCase

ErrorCases lists 401, 429 with a long Retry-After and 5xx.

Jump to

Keyboard shortcuts

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