mirror of
https://github.com/compute-blade-community/compute-blade-agent.git
synced 2026-04-16 15:35:42 +02:00
* chore: update repository references from uptime-industries to compute-blade-community chore: update repository references from uptime-industries to compute-blade-community for consistency and clarity across all files fix: update links in CHANGELOG.md and README.md to point to the new repository location for accurate documentation fix: update Dockerfile and systemd service file to reflect the new repository URL for proper source tracking refactor: change import paths in Go files to use the new repository name for correct package referencing * chore: Add CODEOWNERS * feat: add auto-labeling --------- Co-authored-by: Cedric Kienzler <cedric@specht-labs.de>
62 lines
1.4 KiB
Go
62 lines
1.4 KiB
Go
package hal
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/compute-blade-community/compute-blade-agent/pkg/hal/led"
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// fails if ComputeBladeHalMock does not implement ComputeBladeHal
|
|
var _ ComputeBladeHal = &ComputeBladeHalMock{}
|
|
|
|
// ComputeBladeHalMock implements a mock for the ComputeBladeHal interface
|
|
type ComputeBladeHalMock struct {
|
|
mock.Mock
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) Run(ctx context.Context) error {
|
|
args := m.Called(ctx)
|
|
return args.Error(0)
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) Close() error {
|
|
args := m.Called()
|
|
return args.Error(0)
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) SetFanSpeed(percent uint8) error {
|
|
args := m.Called(percent)
|
|
return args.Error(0)
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) GetFanRPM() (float64, error) {
|
|
args := m.Called()
|
|
return args.Get(0).(float64), args.Error(1)
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) SetStealthMode(enabled bool) error {
|
|
args := m.Called(enabled)
|
|
return args.Error(0)
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) GetPowerStatus() (PowerStatus, error) {
|
|
args := m.Called()
|
|
return args.Get(0).(PowerStatus), args.Error(1)
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) WaitForEdgeButtonPress(ctx context.Context) error {
|
|
args := m.Called(ctx)
|
|
return args.Error(0)
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) SetLed(idx uint, color led.Color) error {
|
|
args := m.Called(idx, color)
|
|
return args.Error(0)
|
|
}
|
|
|
|
func (m *ComputeBladeHalMock) GetTemperature() (float64, error) {
|
|
args := m.Called()
|
|
return args.Get(0).(float64), args.Error(1)
|
|
}
|