AdGuardDNS/internal/bindtodevice/bindtodevice_internal_test.go

28 lines
418 B
Go
Raw Normal View History

2023-03-18 17:11:10 +03:00
package bindtodevice
import (
"net"
2023-06-11 12:58:40 +03:00
"net/netip"
2023-03-18 17:11:10 +03:00
"time"
)
2024-01-04 19:22:32 +03:00
// testTimeout is a common timeout for tests.
2023-06-11 12:58:40 +03:00
const testTimeout = 1 * time.Second
2023-03-18 17:11:10 +03:00
// Common addresses for tests.
var (
testLAddr = &net.UDPAddr{
IP: net.IP{1, 2, 3, 4},
Port: 53,
}
testRAddr = &net.UDPAddr{
IP: net.IP{5, 6, 7, 8},
Port: 1234,
}
)
2023-06-11 12:58:40 +03:00
// Common subnets for tests.
var (
testSubnetIPv4 = netip.MustParsePrefix("1.2.3.0/24")
)