mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 02:21:58 +00:00
tailcfg: don't panic on clone of nil RegisterRequest
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
dabeda21e0
commit
3e2a7de2e9
@@ -546,3 +546,11 @@ func TestDiscoKeyAppend(t *testing.T) {
|
||||
t.Errorf("got %q; want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRegisterRequestNilClone(t *testing.T) {
|
||||
var nilReq *RegisterRequest
|
||||
got := nilReq.Clone()
|
||||
if got != nil {
|
||||
t.Errorf("got = %v; want nil", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user