Fix moc interface

This commit is contained in:
Zoltan Papp 2024-07-09 10:34:13 +02:00
parent 1065e0a6c5
commit 3bd15dd1c4

View File

@ -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 {