wgengine/router: refactor udm-pro into broader ubnt support

Fixes #14453

Signed-off-by: Jason Barnett <J@sonBarnett.com>
This commit is contained in:
Jason Barnett
2024-12-22 13:18:40 -07:00
committed by Adrian Dewhurst
parent e3bcb2ec83
commit 17b881538a
3 changed files with 17 additions and 56 deletions

View File

@ -1233,14 +1233,14 @@ func adjustFwmask(t *testing.T, s string) string {
return fwmaskAdjustRe.ReplaceAllString(s, "$1")
}
func TestIPRulesForUDMPro(t *testing.T) {
func TestIPRulesForUBNT(t *testing.T) {
// Override the global getDistroFunc
getDistroFunc = func() distro.Distro {
return distro.UDMPro
return distro.UBNT
}
defer func() { getDistroFunc = distro.Get }() // Restore original after the test
expected := udmProIPRules
expected := ubntIPRules
actual := ipRules()
if len(expected) != len(actual) {