Ported remaining netns.sh
- Ported remaining netns.sh tests - Begin work on generic implementation of bind interface
This commit is contained in:
parent
e1227d3af4
commit
fa399a91d5
13 changed files with 194 additions and 28 deletions
|
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
@ -15,6 +16,10 @@ type DummyTUN struct {
|
|||
events chan TUNEvent
|
||||
}
|
||||
|
||||
func (tun *DummyTUN) File() *os.File {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tun *DummyTUN) Name() string {
|
||||
return tun.name
|
||||
}
|
||||
|
|
@ -67,7 +72,8 @@ func randDevice(t *testing.T) *Device {
|
|||
t.Fatal(err)
|
||||
}
|
||||
tun, _ := CreateDummyTUN("dummy")
|
||||
device := NewDevice(tun, LogLevelError)
|
||||
logger := NewLogger(LogLevelError, "")
|
||||
device := NewDevice(tun, logger)
|
||||
device.SetPrivateKey(sk)
|
||||
return device
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue