mirror of
https://github.com/netbirdio/netbird.git
synced 2025-02-07 14:00:12 +01:00
Fix moc interface
This commit is contained in:
parent
1065e0a6c5
commit
3bd15dd1c4
@ -10,6 +10,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type MockWGIface struct {
|
type MockWGIface struct {
|
||||||
|
CreateFunc func() error
|
||||||
|
CreateOnAndroidFunc func(routeRange []string, ip string, domains []string) error
|
||||||
IsUserspaceBindFunc func() bool
|
IsUserspaceBindFunc func() bool
|
||||||
NameFunc func() string
|
NameFunc func() string
|
||||||
AddressFunc func() WGAddress
|
AddressFunc func() WGAddress
|
||||||
@ -33,11 +35,11 @@ func (m *MockWGIface) GetInterfaceGUIDString() (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *MockWGIface) Create() error {
|
func (m *MockWGIface) Create() error {
|
||||||
return m.Create()
|
return m.CreateFunc()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MockWGIface) CreateOnAndroid(routeRange []string, ip string, domains []string) error {
|
func (m *MockWGIface) CreateOnAndroid(routeRange []string, ip string, domains []string) error {
|
||||||
return m.CreateOnAndroid(routeRange, ip, domains)
|
return m.CreateOnAndroidFunc(routeRange, ip, domains)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MockWGIface) IsUserspaceBind() bool {
|
func (m *MockWGIface) IsUserspaceBind() bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user