mocks

package
v1.19.2-redfish.preview.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mocks provides mock implementations for testing.

Index

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

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL