test

package
v2.34.17 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: AGPL-3.0 Imports: 11 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BidirectionalTunnels

func BidirectionalTunnels(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)

func CoordinateRequestPanicTest added in v2.29.27

func CoordinateRequestPanicTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)

CoordinateRequestPanicTest checks that a failed connection is withdrawn while other connections continue exchanging updates.

func GracefulDisconnectTest

func GracefulDisconnectTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)

func InvalidCoordinateRequestTest added in v2.29.27

func InvalidCoordinateRequestTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)

InvalidCoordinateRequestTest checks that malformed requests are rejected before authorization and that a valid node bundled with a malformed entry is not published to tunnel peers.

func LostTest

func LostTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)

func ReadyForHandshakeNoPermissionTest added in v2.11.0

func ReadyForHandshakeNoPermissionTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)

func ReadyForHandshakeTest added in v2.11.0

func ReadyForHandshakeTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)

Types

type CoordinateeAuthFunc added in v2.29.27

type CoordinateeAuthFunc func(context.Context, *proto.CoordinateRequest) error

CoordinateeAuthFunc adapts a plain function to tailnet.CoordinateeAuth so a test can return a specific error or panic on a chosen request without declaring a new type.

func (CoordinateeAuthFunc) Authorize added in v2.29.27

type FakeCoordinateeAuth added in v2.18.0

type FakeCoordinateeAuth struct {
	Chan chan struct{}
}

func (FakeCoordinateeAuth) Authorize added in v2.18.0

type FakeSubjectKey added in v2.18.0

type FakeSubjectKey struct{}

type Peer

type Peer struct {
	ID uuid.UUID
	// contains filtered or unexported fields
}

func NewAgent added in v2.16.0

func NewAgent(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string) *Peer

NewAgent is a wrapper around NewPeer, creating a peer with Agent auth tied to its ID

func NewClient added in v2.16.0

func NewClient(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string, agentID uuid.UUID) *Peer

NewClient is a wrapper around NewPeer, creating a peer with Client auth tied to the provided agentID

func NewPeer

func NewPeer(ctx context.Context, t testing.TB, coord tailnet.CoordinatorV2, name string, opts ...PeerOption) *Peer

func (*Peer) AddTunnel

func (p *Peer) AddTunnel(other uuid.UUID)

func (*Peer) AssertEventuallyDisconnected

func (p *Peer) AssertEventuallyDisconnected(other uuid.UUID)

func (*Peer) AssertEventuallyGetsError added in v2.11.0

func (p *Peer) AssertEventuallyGetsError(match string)

func (*Peer) AssertEventuallyHasDERP

func (p *Peer) AssertEventuallyHasDERP(other uuid.UUID, derp int32)

func (*Peer) AssertEventuallyLost

func (p *Peer) AssertEventuallyLost(other uuid.UUID)

func (*Peer) AssertEventuallyReadyForHandshake added in v2.11.0

func (p *Peer) AssertEventuallyReadyForHandshake(other uuid.UUID)

func (*Peer) AssertEventuallyResponsesClosed

func (p *Peer) AssertEventuallyResponsesClosed(expectedError string)

func (*Peer) AssertNeverHasDERPs added in v2.16.0

func (p *Peer) AssertNeverHasDERPs(ctx context.Context, other uuid.UUID, expected ...int32)

func (*Peer) AssertNeverUpdateKind added in v2.15.0

func (p *Peer) AssertNeverUpdateKind(peer uuid.UUID, kind proto.CoordinateResponse_PeerUpdate_Kind)

AssertNeverUpdateKind asserts that we have not received any updates on the provided peer for the provided kind.

func (*Peer) AssertNotClosed added in v2.16.0

func (p *Peer) AssertNotClosed(d time.Duration)

func (*Peer) Close

func (p *Peer) Close(ctx context.Context)

func (*Peer) ConnectToCoordinator added in v2.15.0

func (p *Peer) ConnectToCoordinator(ctx context.Context, c tailnet.CoordinatorV2)

func (*Peer) Disconnect

func (p *Peer) Disconnect()

func (*Peer) ReadyForHandshake added in v2.11.0

func (p *Peer) ReadyForHandshake(peer uuid.UUID)

func (*Peer) RemoveTunnel added in v2.18.0

func (p *Peer) RemoveTunnel(other uuid.UUID)

func (*Peer) UngracefulDisconnect added in v2.16.0

func (p *Peer) UngracefulDisconnect(ctx context.Context)

func (*Peer) UpdateDERP

func (p *Peer) UpdateDERP(derp int32)

func (*Peer) UpdateNode added in v2.16.0

func (p *Peer) UpdateNode(node *proto.Node)

type PeerOption added in v2.16.0

type PeerOption func(*Peer)

func WithAuth added in v2.16.0

func WithAuth(auth tailnet.CoordinateeAuth) PeerOption

func WithID added in v2.16.0

func WithID(id uuid.UUID) PeerOption

type PeerStatus

type PeerStatus struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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