summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-24 19:58:16 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-24 19:58:16 +0200
commit2496cdd8e6078e2a6955b7facb239e4cf2fe5e55 (patch)
treebbd453ce7c25d43cc797c25fa4c241e2b21d3d1e
parent4365b4583fa32b1b77d33f5074da9c165a28f824 (diff)
Fix tests
-rw-r--r--helper_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/helper_test.go b/helper_test.go
index b7c9c6c..294d52c 100644
--- a/helper_test.go
+++ b/helper_test.go
@@ -9,6 +9,7 @@ package main
import (
"bytes"
"errors"
+ "git.zx2c4.com/wireguard-go/tun"
"os"
"testing"
)
@@ -20,7 +21,7 @@ type DummyTUN struct {
name string
mtu int
packets chan []byte
- events chan TUNEvent
+ events chan tun.TUNEvent
}
func (tun *DummyTUN) File() *os.File {
@@ -46,7 +47,7 @@ func (tun *DummyTUN) Close() error {
return nil
}
-func (tun *DummyTUN) Events() chan TUNEvent {
+func (tun *DummyTUN) Events() chan tun.TUNEvent {
return tun.events
}
@@ -59,11 +60,11 @@ func (tun *DummyTUN) Read(d []byte, offset int) (int, error) {
return len(t), nil
}
-func CreateDummyTUN(name string) (TUNDevice, error) {
+func CreateDummyTUN(name string) (tun.TUNDevice, error) {
var dummy DummyTUN
dummy.mtu = 0
dummy.packets = make(chan []byte, 100)
- dummy.events = make(chan TUNEvent, 10)
+ dummy.events = make(chan tun.TUNEvent, 10)
return &dummy, nil
}