fix: validate pf state before stabilization

This commit is contained in:
Dev Scribe
2026-08-12 14:05:18 +07:00
committed by Cuong Manh Le
parent 171dd0a7e6
commit 58a5ea56af
15 changed files with 2018 additions and 495 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")
}
}