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

testbed

package
v0.68.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCLI

func RunCLI(args []string) int

Types

type Credentials

type Credentials = credentials

Credentials is the public, secret-bearing testbed credential record. Callers must keep it in memory and never print it.

type Instance

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

func Start

func Start(ctx context.Context, opts Options) (*Instance, error)

Start boots an isolated testbed and waits until stellad is ready and fixture credentials have been created.

func (*Instance) BaseURL

func (i *Instance) BaseURL() string

func (*Instance) Credentials

func (i *Instance) Credentials() (Credentials, error)

func (*Instance) DatabaseURL

func (i *Instance) DatabaseURL() string

func (*Instance) Done

func (i *Instance) Done() <-chan struct{}

func (*Instance) Fake

func (i *Instance) Fake() *fakeanthropic.Fake

func (*Instance) Kill

func (i *Instance) Kill() error

func (*Instance) LogPath

func (i *Instance) LogPath() string

func (*Instance) LogTail

func (i *Instance) LogTail(n int) string

func (*Instance) ProcessGroupAlive

func (i *Instance) ProcessGroupAlive() bool

func (*Instance) Restart

func (i *Instance) Restart(ctx context.Context) error

func (*Instance) Stop

func (i *Instance) Stop() error

func (*Instance) Terminate

func (i *Instance) Terminate() error

func (*Instance) WaitErr

func (i *Instance) WaitErr() error

type Options

type Options struct {
	RepoRoot  string
	Port      int
	FakeModel bool
	// FakeStreamChunks and FakeStreamIntervalMS shape the fake model's streaming
	// so perf runs can control response pacing. Zero keeps the fake's defaults.
	FakeStreamChunks     int
	FakeStreamIntervalMS int
	Bootstrap            bool
	Managed              bool
	// VaultKey is test-only injection for startup-failure coverage. Empty uses a generated identity.
	VaultKey     string
	OmitVaultKey bool
}

Options controls one disposable Stella instance. Port zero asks the kernel for a free loopback port, which is useful for system tests.

Directories

Path Synopsis
Command testbed runs a disposable local Stella instance for API and browser tests.
Command testbed runs a disposable local Stella instance for API and browser tests.

Jump to

Keyboard shortcuts

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