control/controlclient: fix canSkipStatus online conditions
concurrent netmaps that if the first is logged in, it is never skipped. This should have been covered be the skip test case, but that case wasn't updated to include level set state. Updates #12639 Updates #17869 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
committed by
James Tucker
parent
0c5b17c1d3
commit
de4a8dbcfc
@@ -98,6 +98,7 @@ func TestCanSkipStatus(t *testing.T) {
|
||||
nm1 := &netmap.NetworkMap{}
|
||||
nm2 := &netmap.NetworkMap{}
|
||||
|
||||
commonPersist := new(persist.Persist).View()
|
||||
tests := []struct {
|
||||
name string
|
||||
s1, s2 *Status
|
||||
@@ -165,8 +166,8 @@ func TestCanSkipStatus(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "skip",
|
||||
s1: &Status{NetMap: nm1},
|
||||
s2: &Status{NetMap: nm2},
|
||||
s1: &Status{NetMap: nm1, LoggedIn: true, InMapPoll: true, Persist: commonPersist},
|
||||
s2: &Status{NetMap: nm2, LoggedIn: true, InMapPoll: true, Persist: commonPersist},
|
||||
want: true,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user