Add an interface between CleanStaleEntries and the lower-level conntrack helpers (ClearEntriesForIP, etc), and a fake implementation of that interface, so that we can explicitly test CleanStaleEntries's logic. Remove some comments from conntrack.go that were explaining the functions' callers rather than explaining the functions themselves (and which were redundant with other comments in the callers anyway).
6.7 KiB
6.7 KiB