testutils

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 51 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMinimalBastionInstanceGroup added in v1.19.0

func BuildMinimalBastionInstanceGroup(name string, subnets ...string) kops.InstanceGroup

func BuildMinimalCluster added in v1.19.0

func BuildMinimalCluster(clusterName string) *kops.Cluster

BuildMinimalCluster a generic minimal cluster

func BuildMinimalMasterInstanceGroup added in v1.19.0

func BuildMinimalMasterInstanceGroup(subnet string) kops.InstanceGroup

func BuildMinimalNodeInstanceGroup added in v1.19.0

func BuildMinimalNodeInstanceGroup(name string, subnets ...string) kops.InstanceGroup

func SetupMockOpenstack added in v1.19.0

func SetupMockOpenstack() *openstack.MockCloud

func ValidateCompletedCluster added in v1.25.0

func ValidateCompletedCluster(t *testing.T, expectedFile string, cluster *kops.Cluster)

func ValidateStaticFiles added in v1.25.0

func ValidateStaticFiles(t *testing.T, expectedDir string, assetBuilder *assets.AssetBuilder)

ValidateStaticFiles is used to validate generate StaticFiles.

func ValidateTasks added in v1.11.0

func ValidateTasks[T fi.SubContext](t *testing.T, expectedFile string, context *fi.ModelBuilderContext[T])

Types

type IntegrationTestHarness

type IntegrationTestHarness struct {
	TempDir string
	T       *testing.T
	// contains filtered or unexported fields
}

func NewIntegrationTestHarness

func NewIntegrationTestHarness(t *testing.T) *IntegrationTestHarness

func (*IntegrationTestHarness) Close

func (h *IntegrationTestHarness) Close()

func (*IntegrationTestHarness) MockKopsVersion

func (h *IntegrationTestHarness) MockKopsVersion(version string)

MockKopsVersion will set the kops version to the specified value, until Close is called

func (*IntegrationTestHarness) SetupMockAWS

func (h *IntegrationTestHarness) SetupMockAWS() *awsup.MockAWSCloud

func (*IntegrationTestHarness) SetupMockGCE

func (h *IntegrationTestHarness) SetupMockGCE() *gcemock.MockGCECloud

SetupMockGCE configures a mock GCE cloud provider

type Model added in v1.11.0

type Model struct {
	Cluster        *kops.Cluster
	InstanceGroups []*kops.InstanceGroup

	// AdditionalObjects holds cluster-asssociated configuration objects, other than the Cluster and InstanceGroups.
	AdditionalObjects []*unstructured.Unstructured
}

func LoadModel added in v1.11.0

func LoadModel(basedir string) (*Model, error)

LoadModel loads a cluster and instancegroups from a cluster.yaml file found in basedir

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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