regtestutil

package
v1.10.0-rc3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

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