baremetal

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaremetalTestHelper

type BaremetalTestHelper struct {
	// contains filtered or unexported fields
}

BaremetalTestHelper is an helper class for the baremetal tests, providing support for the most common operations perfomed by the tests. It will also help in reducing the noise in the test definition by hiding technical details

func NewBaremetalTestHelper

func NewBaremetalTestHelper(dc dynamic.Interface) *BaremetalTestHelper

NewBaremetalTestHelper creates a new test helper instance. It is meant to be used in the BeforeEach method

func (*BaremetalTestHelper) CanDeployExtraWorkers

func (b *BaremetalTestHelper) CanDeployExtraWorkers() bool

CanDeployExtraWorkers checks if current platform contains the necessary data to deploy additional workers

func (*BaremetalTestHelper) CreateExtraWorker

func (b *BaremetalTestHelper) CreateExtraWorker(host *unstructured.Unstructured, secret *v1.Secret) (*unstructured.Unstructured, *v1.Secret)

CreateExtraWorker creates a new BaremetalHost (and associated Secret). If successfull, returns the newly created host and secret resources

func (*BaremetalTestHelper) DeleteAllExtraWorkers

func (b *BaremetalTestHelper) DeleteAllExtraWorkers()

DeleteAllExtraWorkers deletes all the extra workers created in the current session

func (*BaremetalTestHelper) DeployExtraWorker

func (b *BaremetalTestHelper) DeployExtraWorker(index int) (*unstructured.Unstructured, *v1.Secret)

DeployExtraWorker is an utility function that creates the specified worker and waits until it reaches the Available state

func (*BaremetalTestHelper) GetExtraWorkerData

func (b *BaremetalTestHelper) GetExtraWorkerData(index int) (*unstructured.Unstructured, *v1.Secret)

GetExtraWorkerData gets baremetal host and secret for the specified extra worker. If not found, the test will fail

func (*BaremetalTestHelper) Setup

func (b *BaremetalTestHelper) Setup()

func (*BaremetalTestHelper) WaitForProvisioningState

func (b *BaremetalTestHelper) WaitForProvisioningState(host *unstructured.Unstructured, expectedProvisioningState string) *unstructured.Unstructured

WaitForProvisioningState waits for the given baremetal host to reach the specified provisioning state. If successfull, returns the updated host resource, otherwise the test will fail

type FieldGetterFunc

type FieldGetterFunc func(obj map[string]interface{}, fields ...string) (interface{}, bool, error)

Jump to

Keyboard shortcuts

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