Documentation
¶
Overview ¶
Package mocks provides mock implementations for testing.
Index ¶
- type MockComputerSystemRepo
- func (r *MockComputerSystemRepo) AddSystem(system *redfishv1.ComputerSystem)
- func (r *MockComputerSystemRepo) GetAll(_ context.Context) ([]string, error)
- func (r *MockComputerSystemRepo) GetBootSettings(_ context.Context, systemID string) (*generated.ComputerSystemBoot, error)
- func (r *MockComputerSystemRepo) GetByID(_ context.Context, systemID string) (*redfishv1.ComputerSystem, error)
- func (r *MockComputerSystemRepo) RemoveSystem(systemID string)
- func (r *MockComputerSystemRepo) UpdateBootSettings(_ context.Context, systemID string, boot *generated.ComputerSystemBoot) error
- func (r *MockComputerSystemRepo) UpdatePowerState(_ context.Context, systemID string, state redfishv1.PowerState) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockComputerSystemRepo ¶
type MockComputerSystemRepo struct {
// contains filtered or unexported fields
}
MockComputerSystemRepo implements ComputerSystemRepository with in-memory test data.
func NewMockComputerSystemRepo ¶
func NewMockComputerSystemRepo() *MockComputerSystemRepo
NewMockComputerSystemRepo creates a new mock repository with sample test data.
func (*MockComputerSystemRepo) AddSystem ¶
func (r *MockComputerSystemRepo) AddSystem(system *redfishv1.ComputerSystem)
AddSystem adds a new system to the mock repository (for testing).
func (*MockComputerSystemRepo) GetAll ¶
func (r *MockComputerSystemRepo) GetAll(_ context.Context) ([]string, error)
GetAll retrieves all computer system IDs.
func (*MockComputerSystemRepo) GetBootSettings ¶
func (r *MockComputerSystemRepo) GetBootSettings(_ context.Context, systemID string) (*generated.ComputerSystemBoot, error)
GetBootSettings retrieves the current boot configuration for a system (mock implementation).
func (*MockComputerSystemRepo) GetByID ¶
func (r *MockComputerSystemRepo) GetByID(_ context.Context, systemID string) (*redfishv1.ComputerSystem, error)
GetByID retrieves a computer system by its ID.
func (*MockComputerSystemRepo) RemoveSystem ¶
func (r *MockComputerSystemRepo) RemoveSystem(systemID string)
RemoveSystem removes a system from the mock repository (for testing).
func (*MockComputerSystemRepo) UpdateBootSettings ¶
func (r *MockComputerSystemRepo) UpdateBootSettings(_ context.Context, systemID string, boot *generated.ComputerSystemBoot) error
UpdateBootSettings updates the boot configuration for a system (mock implementation).
func (*MockComputerSystemRepo) UpdatePowerState ¶
func (r *MockComputerSystemRepo) UpdatePowerState(_ context.Context, systemID string, state redfishv1.PowerState) error
UpdatePowerState updates the power state of a system.