Add assert func for verifying status, netmap and netcheck (#1723)

This commit is contained in:
Kristoffer Dalby 2024-02-09 07:26:41 +01:00 committed by GitHub
parent 83769ba715
commit 00e7550e76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 534 additions and 18 deletions

View file

@ -201,9 +201,15 @@ func (h *Headscale) handlePoll(
return
}
// TODO(kradalby): Figure out why patch changes does
// not show up in output from `tailscale debug netmap`.
// stateUpdate := types.StateUpdate{
// Type: types.StatePeerChangedPatch,
// ChangePatches: []*tailcfg.PeerChange{&change},
// }
stateUpdate := types.StateUpdate{
Type: types.StatePeerChangedPatch,
ChangePatches: []*tailcfg.PeerChange{&change},
Type: types.StatePeerChanged,
ChangeNodes: types.Nodes{node},
}
if stateUpdate.Valid() {
ctx := types.NotifyCtx(context.Background(), "poll-nodeupdate-peers-patch", node.Hostname)