Pull request 2361: imp-test-file-names
Merge in DNS/adguard-home from imp-test-file-names to master Squashed commit of the following: commit a0827efdf633fba012c5eb0e0f69eaabf7629724 Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Mon Mar 10 21:41:46 2025 +0300 all: imp tests commit 21fc274d9276ce0442572261ea39a1c018490870 Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Mon Mar 10 19:40:40 2025 +0300 all: imp test file names
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package aghnet
|
||||
package aghnet_test
|
||||
|
||||
import (
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghnet"
|
||||
"github.com/AdguardTeam/golibs/netutil"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@@ -18,7 +19,7 @@ func TestIPMut(t *testing.T) {
|
||||
}}
|
||||
|
||||
t.Run("nil_no_mut", func(t *testing.T) {
|
||||
ipmut := NewIPMut(nil)
|
||||
ipmut := aghnet.NewIPMut(nil)
|
||||
|
||||
ips := netutil.CloneIPs(testIPs)
|
||||
for i := range ips {
|
||||
@@ -28,7 +29,7 @@ func TestIPMut(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("not_nil_mut", func(t *testing.T) {
|
||||
ipmut := NewIPMut(func(ip net.IP) {
|
||||
ipmut := aghnet.NewIPMut(func(ip net.IP) {
|
||||
for i := range ip {
|
||||
ip[i] = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user