testutil

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGitRepoWithOrigin added in v0.0.10

func InitGitRepoWithOrigin(t *testing.T, dir string)

func NewTestDB

func NewTestDB(t *testing.T) *db.DB

func SeedProjectFixture added in v0.6.0

func SeedProjectFixture(t *testing.T, ts *TestServer, dir string, output any) error

SeedProjectFixture places a test identity in the registry and its runtime definitions in the workspace.

func SeedWorkspace added in v0.0.13

func SeedWorkspace(t *testing.T, ts *TestServer, slug string)

SeedWorkspace upserts an empty workspaces table row for slug directly via the daemon's DB, bypassing both the CLI and the HTTP API (which exposes no creation endpoint). Tests that assign a project to a workspace slug other than orchestrator.DefaultWorkspaceSlug must call this first: ProjectAppService.SetProjectWorkspace rejects assignment to a slug with no corresponding row.

func ServeGitRepository added in v0.6.0

func ServeGitRepository(t *testing.T, dir string) string

ServeGitRepository exposes a local fixture through Git's dumb HTTP protocol.

Types

type TestServer

type TestServer struct {
	Server *server.Server
	Client *client.Client
}

TestServer wraps a running server for testing.

func NewTestServer

func NewTestServer(t *testing.T) *TestServer

NewTestServer starts a server with a temp UNIX socket and in-memory DB.

Directories

Path Synopsis
Package homeenv isolates a test binary from the real developer machine's persistent boid state — $HOME, the XDG base directories, and the docker engine — and lets a test assert that the isolation is actually in place.
Package homeenv isolates a test binary from the real developer machine's persistent boid state — $HOME, the XDG base directories, and the docker engine — and lets a test assert that the isolation is actually in place.

Jump to

Keyboard shortcuts

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