fix(failover): satisfy lint on the manager package

errcheck flagged two side-effect-only m.Plan calls in tests, and unused
flagged close(), which Task 5's probe scheduler wires in.

Assisted-by: Claude:claude-opus-5-5
This commit is contained in:
Ettore Di Giacinto committed 2026-09-26 15:41:24 +00:00
1 parent 929085a030
commit 5601692f55
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -575,6 +575,7 @@ func (m *Manager) emitLocked(ev Event) {
}
}
//nolint:unused // wired by the Task 5 probe scheduler's Stop, which owns the manager's lifecycle
func (m *Manager) close() {
m.mu.Lock()
defer m.mu.Unlock()
+2 -2
View File
@@ -88,7 +88,7 @@ var _ = Describe("Manager", func() {
})
It("fails back only after recovery probes and min_dwell", func() {
m.Plan("chain")
_, _ = m.Plan("chain")
m.ReportFailure("a", errBoom)
for i := 0; i < 3; i++ {
m.ReportSuccess("a") // a real success counts like a passed inference probe
@@ -158,7 +158,7 @@ var _ = Describe("Manager", func() {
})
It("marks a removed target missing and leaves it out of plans", func() {
m.Plan("chain")
_, _ = m.Plan("chain")
src.Delete("a")
m.Sync()
st, _ := m.ChainStatus("chain")