Documentation
¶
Index ¶
Constants ¶
const TestAdminToken = "test-admin-secret"
TestAdminToken is the admin token used in tests for network creation.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DaemonInfo ¶
DaemonInfo holds references for a started daemon and its driver.
type TestEnv ¶
type TestEnv struct {
Beacon *beacon.Server
Registry *registry.Server
// Resolved addresses (only valid after Start)
BeaconAddr string
RegistryAddr string
AdminToken string
// contains filtered or unexported fields
}
TestEnv manages a complete Pilot Protocol test environment with OS-assigned ports and proper readiness signaling (no time.Sleep).
func NewTestEnv ¶
NewTestEnv creates and starts a beacon + registry with OS-assigned ports. Call AddDaemon() to add daemons after creation.
func (*TestEnv) AddDaemon ¶
func (env *TestEnv) AddDaemon(opts ...func(*daemon.Config)) *DaemonInfo
AddDaemon starts a daemon connected to this environment's registry/beacon. Optional config overrides can be applied via the opts function.
func (*TestEnv) AddDaemonOnly ¶
AddDaemonOnly starts a daemon without creating a driver (for tests that need to manage the driver lifecycle separately).
func (*TestEnv) SocketPath ¶
SocketPath returns a unique socket path within the temp directory.