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