From 3bd15dd1c48a4363a3d7e6b1de19f3f9cf2efbd5 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Tue, 9 Jul 2024 10:34:13 +0200 Subject: [PATCH] Fix moc interface --- iface/iface_moc.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iface/iface_moc.go b/iface/iface_moc.go index e0d9451fd..fab3054a0 100644 --- a/iface/iface_moc.go +++ b/iface/iface_moc.go @@ -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 {