testenv

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 8 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 testenv builds an indexed test registry for tests of the interfaces on top of the service: the API, MCP server, CLI and commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Options

func Options(r *testreg.Registry) crawl.Options

Options returns crawl options for a test registry.

Types

type Env

type Env struct {
	Reg *testreg.Registry
	Svc *service.Service
	// DB is the index file, for tests that open it themselves.
	DB string
}

Env is a test registry and an index of it.

func Indexed

func Indexed(t testing.TB) *Env

Indexed starts a test registry and indexes it into a temp file, kept open for the test's lifetime.

func IndexedFile

func IndexedFile(t testing.TB) *Env

IndexedFile indexes a test registry into a temp file and closes it, so a command under test can open it.

Jump to

Keyboard shortcuts

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