| 42 | } |
| 43 | |
| 44 | func BidirectionalTunnels(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2) { |
| 45 | p1 := NewPeer(ctx, t, coordinator, "p1") |
| 46 | defer p1.Close(ctx) |
| 47 | p2 := NewPeer(ctx, t, coordinator, "p2") |
| 48 | defer p2.Close(ctx) |
| 49 | p1.AddTunnel(p2.ID) |
| 50 | p2.AddTunnel(p1.ID) |
| 51 | p1.UpdateDERP(1) |
| 52 | p2.UpdateDERP(2) |
| 53 | |
| 54 | p1.AssertEventuallyHasDERP(p2.ID, 2) |
| 55 | p2.AssertEventuallyHasDERP(p1.ID, 1) |
| 56 | } |
| 57 | |
| 58 | func ReadyForHandshakeTest(ctx context.Context, t *testing.T, coordinator tailnet.CoordinatorV2) { |
| 59 | p1 := NewPeer(ctx, t, coordinator, "p1") |