19 lines
475 B
Go
Raw Normal View History

2025-04-26 19:33:14 +08:00
package testdev
import "b612.me/apps/b612/gdu/pkg/device"
// DevicesInfoGetterMock is mock of DevicesInfoGetter
type DevicesInfoGetterMock struct {
Devices device.Devices
}
// GetDevicesInfo returns mocked devices
func (t DevicesInfoGetterMock) GetDevicesInfo() (device.Devices, error) {
return t.Devices, nil
}
// GetMounts returns all mounted filesystems from /proc/mounts
func (t DevicesInfoGetterMock) GetMounts() (device.Devices, error) {
return t.Devices, nil
}