ipn/ipnlocal: use named arguments for mockControl.send()
Updates #cleanup Signed-off-by: Alex Chan <alexc@tailscale.com>
This commit is contained in:
@@ -6145,7 +6145,7 @@ func TestLoginNotifications(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
lb.cc.(*mockControl).send(nil, loginURL, false, nil)
|
||||
lb.cc.(*mockControl).send(sendOpt{url: loginURL})
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(len(sessions))
|
||||
@@ -6810,7 +6810,7 @@ func TestSrcCapPacketFilter(t *testing.T) {
|
||||
must.Do(k.UnmarshalText([]byte("nodekey:5c8f86d5fc70d924e55f02446165a5dae8f822994ad26bcf4b08fd841f9bf261")))
|
||||
|
||||
controlClient := lb.cc.(*mockControl)
|
||||
controlClient.send(nil, "", false, &netmap.NetworkMap{
|
||||
controlClient.send(sendOpt{nm: &netmap.NetworkMap{
|
||||
SelfNode: (&tailcfg.Node{
|
||||
Addresses: []netip.Prefix{netip.MustParsePrefix("1.1.1.1/32")},
|
||||
}).View(),
|
||||
@@ -6839,7 +6839,7 @@ func TestSrcCapPacketFilter(t *testing.T) {
|
||||
},
|
||||
}},
|
||||
}},
|
||||
})
|
||||
}})
|
||||
|
||||
f := lb.GetFilterForTest()
|
||||
res := f.Check(netip.MustParseAddr("2.2.2.2"), netip.MustParseAddr("1.1.1.1"), 22, ipproto.TCP)
|
||||
@@ -7015,10 +7015,10 @@ func TestDisplayMessageIPNBus(t *testing.T) {
|
||||
cc := lb.cc.(*mockControl)
|
||||
|
||||
// Assert that we are logged in and authorized, and also send our DisplayMessages
|
||||
cc.send(nil, "", true, &netmap.NetworkMap{
|
||||
cc.send(sendOpt{loginFinished: true, nm: &netmap.NetworkMap{
|
||||
SelfNode: (&tailcfg.Node{MachineAuthorized: true}).View(),
|
||||
DisplayMessages: msgs,
|
||||
})
|
||||
}})
|
||||
|
||||
// Tell the health tracker that we are in a map poll because
|
||||
// mockControl doesn't tell it
|
||||
|
||||
Reference in New Issue
Block a user