diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-02-22 02:01:50 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-02-23 20:00:57 +0100 |
commit | a4f8e83d5d9f477554971e90e9ab85922f506ea9 (patch) | |
tree | 5249ac2dbdc8cbb6a7d2d40814b07d7d1f38ad4d /device/device_test.go | |
parent | c69481f1b3b4b37b9c16f997a5d8d91367d9bfee (diff) |
conn: make binds replacable
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/device_test.go')
-rw-r--r-- | device/device_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/device/device_test.go b/device/device_test.go index 7958fb9..01ee2ac 100644 --- a/device/device_test.go +++ b/device/device_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + "golang.zx2c4.com/wireguard/conn" "golang.zx2c4.com/wireguard/tun/tuntest" ) @@ -158,7 +159,7 @@ func genTestPair(tb testing.TB) (pair testPair) { if _, ok := tb.(*testing.B); ok && !testing.Verbose() { level = LogLevelError } - p.dev = NewDevice(p.tun.TUN(), NewLogger(level, fmt.Sprintf("dev%d: ", i))) + p.dev = NewDevice(p.tun.TUN(), conn.NewDefaultBind(), NewLogger(level, fmt.Sprintf("dev%d: ", i))) if err := p.dev.IpcSet(cfg[i]); err != nil { tb.Errorf("failed to configure device %d: %v", i, err) p.dev.Close() @@ -332,7 +333,7 @@ func randDevice(t *testing.T) *Device { } tun := newDummyTUN("dummy") logger := NewLogger(LogLevelError, "") - device := NewDevice(tun, logger) + device := NewDevice(tun, conn.NewDefaultBind(), logger) device.SetPrivateKey(sk) return device } |