MCPcopy Index your code
hub / github.com/coder/coder / LostTest

Function LostTest

tailnet/test/cases.go:28–42  ·  view source on GitHub ↗
(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2)

Source from the content-addressed store, hash-verified

26}
27
28func LostTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2) {
29 p1 := NewPeer(ctx, t, coordinator, "p1")
30 defer p1.Close(ctx)
31 p2 := NewPeer(ctx, t, coordinator, "p2")
32 defer p2.Close(ctx)
33 p1.AddTunnel(p2.ID)
34 p1.UpdateDERP(1)
35 p2.UpdateDERP(2)
36
37 p1.AssertEventuallyHasDERP(p2.ID, 2)
38 p2.AssertEventuallyHasDERP(p1.ID, 1)
39
40 p2.Close(ctx)
41 p1.AssertEventuallyLost(p2.ID)
42}
43
44func BidirectionalTunnels(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2) {
45 p1 := NewPeer(ctx, t, coordinator, "p1")

Callers 1

TestCoordinator_LostFunction · 0.92

Calls 6

CloseMethod · 0.95
AddTunnelMethod · 0.95
UpdateDERPMethod · 0.95
AssertEventuallyLostMethod · 0.95
NewPeerFunction · 0.85

Tested by 1

TestCoordinator_LostFunction · 0.74