Use custom stdnet

This commit is contained in:
braginini
2023-04-03 17:37:05 +02:00
parent 79a8109d5e
commit 5d191a8b9d
14 changed files with 103 additions and 40 deletions
+6 -1
View File
@@ -3,6 +3,7 @@ package dns
import (
"context"
"fmt"
"github.com/netbirdio/netbird/client/internal/stdnet"
"net"
"net/netip"
"strings"
@@ -199,7 +200,11 @@ func TestUpdateDNSServer(t *testing.T) {
for n, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
wgIface, err := iface.NewWGIFace(fmt.Sprintf("utun230%d", n), fmt.Sprintf("100.66.100.%d/32", n+1), iface.DefaultMTU, nil)
newNet, err := stdnet.NewNet(nil, nil)
if err != nil {
t.Fatal(err)
}
wgIface, err := iface.NewWGIFace(fmt.Sprintf("utun230%d", n), fmt.Sprintf("100.66.100.%d/32", n+1), iface.DefaultMTU, nil, newNet)
if err != nil {
t.Fatal(err)
}