Thanks to visit codestin.com
Credit goes to pkg.go.dev

test

package
v2.21.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

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 GracefulDisconnectTest

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

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 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()

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