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

Function ReadyForHandshakeNoPermissionTest

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

Source from the content-addressed store, hash-verified

72}
73
74func ReadyForHandshakeNoPermissionTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2) {
75 p1 := NewPeer(ctx, t, coordinator, "p1")
76 defer p1.Close(ctx)
77 p2 := NewPeer(ctx, t, coordinator, "p2")
78 defer p2.Close(ctx)
79 p1.UpdateDERP(1)
80 p2.UpdateDERP(2)
81
82 p2.ReadyForHandshake(p1.ID)
83 p2.AssertEventuallyGetsError(fmt.Sprintf("you do not share a tunnel with %q", p1.ID.String()))
84}

Callers 1

TestCoordinatorFunction · 0.92

Calls 6

CloseMethod · 0.95
UpdateDERPMethod · 0.95
ReadyForHandshakeMethod · 0.95
NewPeerFunction · 0.85
StringMethod · 0.45

Tested by 1

TestCoordinatorFunction · 0.74