diff --git a/hscontrol/servertest/via_ha_compat_test.go b/hscontrol/servertest/via_ha_compat_test.go index 54db6749d..6c4e8b28c 100644 --- a/hscontrol/servertest/via_ha_compat_test.go +++ b/hscontrol/servertest/via_ha_compat_test.go @@ -1229,7 +1229,8 @@ func (r *stepReplay) saasAlias(id tailcfg.NodeID) (string, bool) { return "", false } -// hsAlias is the alias whose machine holds node id. +// hsAlias is the alias whose machine holds node id, or last held it: a +// deleted node a client still lists must count, as saasAlias counts it. func (r *stepReplay) hsAlias(id tailcfg.NodeID) (string, bool) { for alias := range r.clients { for _, nv := range r.machineNodes(alias) { @@ -1239,6 +1240,12 @@ func (r *stepReplay) hsAlias(id tailcfg.NodeID) (string, bool) { } } + for alias, last := range r.lastIDs { + if last == strconv.FormatInt(int64(id), 10) { + return alias, true + } + } + return "", false }