Documentation
¶
Index ¶
- type BaremetalTestHelper
- func (b *BaremetalTestHelper) CanDeployExtraWorkers() bool
- func (b *BaremetalTestHelper) CreateExtraWorker(host *unstructured.Unstructured, secret *v1.Secret) (*unstructured.Unstructured, *v1.Secret)
- func (b *BaremetalTestHelper) DeleteAllExtraWorkers()
- func (b *BaremetalTestHelper) DeployExtraWorker(index int) (*unstructured.Unstructured, *v1.Secret)
- func (b *BaremetalTestHelper) GetExtraWorkerData(index int) (*unstructured.Unstructured, *v1.Secret)
- func (b *BaremetalTestHelper) Setup()
- func (b *BaremetalTestHelper) WaitForProvisioningState(host *unstructured.Unstructured, expectedProvisioningState string) *unstructured.Unstructured
- type FieldGetterFunc
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