fix: validate pf state before stabilization

This commit is contained in:
Dev Scribe
2026-08-21 14:45:56 +07:00
committed by Cuong Manh Le
parent 246c1b9691
commit 779fe015f0
15 changed files with 2036 additions and 488 deletions
@@ -0,0 +1,20 @@
//go:build windows
package cli
import (
"testing"
"time"
)
func TestDNSInterceptIgnoredChangeReconcileDueWindowsPreservesImmediateBehavior(t *testing.T) {
p := &prog{}
now := time.Now()
if !p.dnsInterceptIgnoredChangeReconcileDue(now) {
t.Fatal("first ignored Windows change must reconcile immediately")
}
if !p.dnsInterceptIgnoredChangeReconcileDue(now) {
t.Fatal("Windows ignored changes must not inherit the macOS pf rate limit")
}
}