Help us shape the future of Go! Take the 2026 Go Developer Survey

centraltest

package
v0.116.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package centraltest gives a test a muster in front of a beekeeper serve: its call_tool forwards x_<server>_<tool> to the backend with the caller's bearer and wraps the result as muster does, and a muster binary that names its endpoint and prints a token.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Binary

func Binary(t *testing.T, endpoint, token string) (bin, tokenFile string)

Binary writes a muster binary for one person: `context show` names endpoint, `auth token` prints the token file's content. It returns the binary and the token file, which the test may rewrite.

Types

type Muster

type Muster struct {
	URL string
	// contains filtered or unexported fields
}

Muster is a test muster in front of the beekeeper serve at backend (its /mcp URL), registered as server.

func New

func New(t *testing.T, backend, server string) *Muster

New starts a test muster forwarding to backend.

func (*Muster) Close

func (m *Muster) Close()

Close stops muster itself.

func (*Muster) Down

func (m *Muster) Down(down bool)

Down makes the backend unreachable behind muster (down) or reachable.

Jump to

Keyboard shortcuts

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