mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-24 08:18:30 +00:00
30 lines
645 B
Go
30 lines
645 B
Go
![]() |
// Copyright (c) Tailscale Inc & AUTHORS
|
||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||
|
|
||
|
package magicsock
|
||
|
|
||
|
import (
|
||
|
"net/netip"
|
||
|
"testing"
|
||
|
|
||
|
"tailscale.com/disco"
|
||
|
)
|
||
|
|
||
|
func TestRelayManagerInitAndIdle(t *testing.T) {
|
||
|
rm := relayManager{}
|
||
|
rm.allocateAndHandshakeAllServers(&endpoint{})
|
||
|
<-rm.runLoopStoppedCh
|
||
|
|
||
|
rm = relayManager{}
|
||
|
rm.cancelOutstandingWork(&endpoint{})
|
||
|
<-rm.runLoopStoppedCh
|
||
|
|
||
|
rm = relayManager{}
|
||
|
rm.handleCallMeMaybeVia(&disco.CallMeMaybeVia{})
|
||
|
<-rm.runLoopStoppedCh
|
||
|
|
||
|
rm = relayManager{}
|
||
|
rm.handleBindUDPRelayEndpointChallenge(&disco.BindUDPRelayEndpointChallenge{}, &discoInfo{}, netip.AddrPort{}, 0)
|
||
|
<-rm.runLoopStoppedCh
|
||
|
}
|