installationtest

package
v0.0.1-dev.45 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminAudience

func AdminAudience(origin string) string

func AssertOrigin

func AssertOrigin(t *testing.T, request *http.Request, expected string)

func HTTPClient

func HTTPClient(roundTrip func(*http.Request) (*http.Response, error)) *http.Client

func MachineAuthServer

func MachineAuthServer(t *testing.T, tokenHandler http.HandlerFunc) *httptest.Server

func MountDeviceAuth

func MountDeviceAuth(t *testing.T, mux *http.ServeMux, issuer func() string, plane protocol.Plane,
	check func(*http.Request), expiresIn, interval int64, tokenHandler http.HandlerFunc,
)

func OriginClient

func OriginClient(server *httptest.Server) *http.Client

func SessionResponse

func SessionResponse(resource, endpoint string) map[string]any

func ToolArguments

func ToolArguments(r *http.Request) map[string]any

func ToolName

func ToolName(r *http.Request) string

func WriteJSON

func WriteJSON(w http.ResponseWriter, value any)

Types

type ControlFixtures

type ControlFixtures struct {
	// contains filtered or unexported fields
}

func NewControlFixtures

func NewControlFixtures(t *testing.T, mux *http.ServeMux) *ControlFixtures

func (*ControlFixtures) Handle

func (f *ControlFixtures) Handle(tools []string, match map[string]string, handler http.HandlerFunc)

type ObservedOutput

type ObservedOutput struct {
	OnWrite func(string)
	// contains filtered or unexported fields
}

func (*ObservedOutput) String

func (w *ObservedOutput) String() string

func (*ObservedOutput) Write

func (w *ObservedOutput) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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