common

package
v1.2.3-dev2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0, BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntegrationTestFramework

type IntegrationTestFramework struct {

	// Control cluster resource containing ClientSets for accessing kubernetes resources
	// And kubeconfig file path for the cluster
	// initialization is done by SetupBeforeSuite
	ControlCluster *helpers.Cluster

	// Target cluster resource containing ClientSets for accessing kubernetes resources
	// And kubeconfig file path for the cluster
	// initialization is done by SetupBeforeSuite
	TargetCluster *helpers.Cluster
	// contains filtered or unexported fields
}

IntegrationTestFramework struct holds the values needed by the controller tests

func NewIntegrationTestFramework

func NewIntegrationTestFramework(
	resourcesTracker helpers.ResourcesTrackerInterface,
	intervals ...int64,
) *IntegrationTestFramework

NewIntegrationTestFramework creates a new IntegrationTestFramework initializing resource tracker implementation. Optially the timeout and polling interval are configurable as optional arguments The default values used for Eventually to probe kubernetes cluster resources is 300 seconds for timeout and 2 seconds for polling interval for machine creation, deletion, machinedeployment update e.t.c., The first optional argument is the timeoutSeconds The second optional argument is the pollingIntervalSeconds

func (*IntegrationTestFramework) BeforeEachCheck

func (c *IntegrationTestFramework) BeforeEachCheck()

BeforeEachCheck checks if all the nodes are ready and the controllers are runnings

func (*IntegrationTestFramework) Cleanup

func (c *IntegrationTestFramework) Cleanup()

Cleanup performs rollback of original resources and removes any machines created by the test

func (*IntegrationTestFramework) ControllerTests

func (c *IntegrationTestFramework) ControllerTests()

ControllerTests runs common tests like ... machine resource creation and deletion, machine deployment resource creation, scale-up, scale-down, update and deletion. And orphan resource check by invoking IsOrphanedResourcesAvailable from rti

func (*IntegrationTestFramework) SetupBeforeSuite

func (c *IntegrationTestFramework) SetupBeforeSuite()

SetupBeforeSuite performs the initial setup for the test by - Checks control cluster and target clusters are accessible and initializes ControlCluster and TargetCluster. - Check and optionally create crds (machineclass, machines, machinesets and machine deployment) - using kubernetes/crds directory of the mcm repo. - Setup controller processes either as a pod in the control cluster or running locally. - Setup machineclass to use either by copying existing machineclass in seed cluster or by applying file. - invokes InitializeResourcesTracker or rti for orphan resource check.

type MachineClassPatch

type MachineClassPatch struct {
	ProviderSpec ProviderSpecPatch `json:"providerSpec"`
}

MachineClassPatch struct holds values of patch for machine class for provider GCP

type ProviderSpecPatch

type ProviderSpecPatch struct {
	Tags []string `json:"tags"`
}

ProviderSpecPatch struct holds tags for provider, which we want to patch the machineclass with

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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