Documentation
¶
Overview ¶
Package testnetwork holds the integration labs: nodes booted through the node's own assembly, services.BootApp, on the loopback hosts the labs draw, beside the fixtures they share — the address draws and the polls; the test WebPKI standing in for the core's certificate authority comes from pkg/core/webpki/webpkitest. The labs import the node's assembly, so no package under pkg can host them.
Index ¶
- Constants
- func FreeUDPAddrOn(t *testing.T, ip netip.Addr) string
- func PinnedTCPAddrOn(t *testing.T, ip netip.Addr) string
- func PinnedUDPAddrOn(t *testing.T, ip netip.Addr) string
- func Poll(t *testing.T, what string, cond func() bool)
- func PollErr(t *testing.T, what string, attempt func() error)
- func PollFor(t *testing.T, budget time.Duration, what string, cond func() bool)
Constants ¶
const ( Propagation = 100 * time.Millisecond Registration = 200 * time.Millisecond EnrollRetry = 100 * time.Millisecond TestTimeout = 20 * time.Second // RestartTimeout budgets the restart lab's convergence: the reboot puts // the joiner's loop through serial stages — re-rendezvous, a fresh // prompt, the press, the chain — whose wall-clock pacing stretches // several-fold on a loaded runner under the race detector, where the // fixed TestTimeout missed a pipeline still progressing. RestartTimeout = 3 * TestTimeout )
Test intervals, fast enough for the integration tests to watch the loops.
Variables ¶
This section is empty.
Functions ¶
func FreeUDPAddrOn ¶
FreeUDPAddrOn returns a free UDP address on the given host.
func PinnedTCPAddrOn ¶
PinnedTCPAddrOn returns a TCP address on the given host for a listener to bind: the band's next free port, probed by listening on it and released for the listener's own bind, safe for the same reason as PinnedUDPAddrOn.
func PinnedUDPAddrOn ¶
PinnedUDPAddrOn returns a UDP address on the given host for the node to rebind: the band's next free port, probed by binding it and released for the node's own bind. The release is safe — nothing that binds :0 draws from the band.
Types ¶
This section is empty.