check / check (push) Failing after 37s
detectInconsistencies alerted for every neighbouring pair of nameservers whose records differed, on every DNS check, for as long as they differed. It now also takes the previous hostname state and alerts for a pair only when both nameservers were in that state with equal records. The state loaded at startup is the previous state for the first check, so a disagreement saved before a restart is not reported again. The choice of pairs is in newlyDisagreeingPairs, tested on record data built in the test. The README describes the new behaviour. Model: opus-5-5
12 lines
297 B
Go
12 lines
297 B
Go
package watcher
|
|
|
|
import "sneak.berlin/go/dnswatcher/internal/state"
|
|
|
|
// NewlyDisagreeingPairs exports newlyDisagreeingPairs for testing.
|
|
func NewlyDisagreeingPairs(
|
|
prev *state.HostnameState,
|
|
current map[string]map[string][]string,
|
|
) [][2]string {
|
|
return newlyDisagreeingPairs(prev, current)
|
|
}
|