regtestutil

package
v1.13.3-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: AGPL-3.0 Imports: 4 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 regtestutil exposes a small fixture for spinning up an in-process registry server (and dialed client) for daemon-side tests.

It lives under tests/ because pkg/daemon (L7) cannot import pkg/registry/server (L11) without violating the layered architecture, but daemon tests genuinely need a real registry to exercise regConn.{Lookup,Register,List}Nodes call paths. Tests/ is outside the classified layer stack, so an L7 source importing tests/regtestutil is not a layer violation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartTestRegistry

func StartTestRegistry(t *testing.T) (*registry.Server, *registryclient.Client)

StartTestRegistry boots an in-process registry on 127.0.0.1:0 and dials it. The test is responsible for closing both the server and the client (the standard pattern is `defer reg.Close(); defer rc.Close()`).

Types

This section is empty.

Jump to

Keyboard shortcuts

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