testkit

package
v0.0.0-...-9dbba9d Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestShoot

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

TestShoot allows construction of custom v1beta1.Shoot for testing purposes

func NewTestShoot

func NewTestShoot(name string) *TestShoot

NewTestShoot creates TestShoot and returns pointer to it, allowing to pipe the constraints

func (*TestShoot) InNamespace

func (ts *TestShoot) InNamespace(namespace string) *TestShoot

InNamespace adds namespace to shoot.ObjectMeta.Namespace

func (*TestShoot) ToShoot

func (ts *TestShoot) ToShoot() *v1beta1.Shoot

ToShoot returns TestShoot as *v1beta1.Shoot

func (*TestShoot) WithAutoUpdate

func (ts *TestShoot) WithAutoUpdate(kubernetes, machine bool) *TestShoot

WithAutoUpdate sets values of shoot.Spec.Maintenance.AutoUpdate KubernetesVersion and MachineImageVersion fields

func (*TestShoot) WithExposureClassName

func (ts *TestShoot) WithExposureClassName(exposureClassName string) *TestShoot

func (*TestShoot) WithExtensions

func (ts *TestShoot) WithExtensions(extensions []gardener_types.Extension) *TestShoot

WithExtensions adds gardener_types Extensions to shoot.Spec.Extensions.

func (*TestShoot) WithGeneration

func (ts *TestShoot) WithGeneration(generation int64) *TestShoot

WithGeneration sets value of shoot.Generation field

func (*TestShoot) WithHibernationState

func (ts *TestShoot) WithHibernationState(hibernationPossible bool, hibernated bool) *TestShoot

WithHibernationState sets shoot.Status.IsHibernated and shoot.Status.Constraints

func (*TestShoot) WithKubernetesVersion

func (ts *TestShoot) WithKubernetesVersion(v string) *TestShoot

WithKubernetesVersion sets value to shoot.Spec.Kubernetes.Version

func (*TestShoot) WithObservedGeneration

func (ts *TestShoot) WithObservedGeneration(generation int64) *TestShoot

WithObservedGeneration sets value of shoot.Status.ObservedGeneration

func (*TestShoot) WithOperationError

func (ts *TestShoot) WithOperationError() *TestShoot

WithOperationError marks shoot.Status.LastOperation.State as 'Error'

func (*TestShoot) WithOperationFailed

func (ts *TestShoot) WithOperationFailed() *TestShoot

WithOperationFailed marks shoot.Status.LastOperation.State as 'Failed'

func (*TestShoot) WithOperationNil

func (ts *TestShoot) WithOperationNil() *TestShoot

WithOperationNil sets shoot.Status.LastOperation to nil

func (*TestShoot) WithOperationPending

func (ts *TestShoot) WithOperationPending() *TestShoot

WithOperationPending marks shoot.Status.LastOperation.State as 'Pending'

func (*TestShoot) WithOperationProcessing

func (ts *TestShoot) WithOperationProcessing() *TestShoot

WithOperationProcessing marks shoot.Status.LastOperation.State as 'Processing'

func (*TestShoot) WithOperationSucceeded

func (ts *TestShoot) WithOperationSucceeded() *TestShoot

WithOperationSucceeded marks shoot.Status.LastOperation.State as 'Succeeded'

func (*TestShoot) WithPurpose

func (ts *TestShoot) WithPurpose(purpose string) *TestShoot

WithAutoUpdate sets values of shoot.Spec.Maintenance.AutoUpdate KubernetesVersion and MachineImageVersion fields

func (*TestShoot) WithRateLimitExceededError

func (ts *TestShoot) WithRateLimitExceededError() *TestShoot

func (*TestShoot) WithWorkers

func (ts *TestShoot) WithWorkers(workers ...v1beta1.Worker) *TestShoot

WithWorkers adds v1beta1 Workers to shoot.Spec.Provider.Workers. See also testkit.TestWorker

type TestWorker

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

TestWorker allows construction of Gardener workers

func NewTestWorker

func NewTestWorker(name string) *TestWorker

NewTestWorker creates TestWorker and returns pointer to it, allowing to pipe the constraints

func (*TestWorker) ToWorker

func (tw *TestWorker) ToWorker() v1beta1.Worker

ToWorker returns TestWorker as *v1beta1.Worker

func (*TestWorker) WithMachineImageAndVersion

func (tw *TestWorker) WithMachineImageAndVersion(name string, version string) *TestWorker

func (*TestWorker) WithMachineType

func (tw *TestWorker) WithMachineType(t string) *TestWorker

WithMachineType sets value of worker.Machine.Type

func (*TestWorker) WithMaxSurge

func (tw *TestWorker) WithMaxSurge(max int) *TestWorker

WithMaxSurge sets value of MaxSurge

func (*TestWorker) WithMaxUnavailable

func (tw *TestWorker) WithMaxUnavailable(max int) *TestWorker

WithMaxUnavailable sets value of MaxUnavailable

func (*TestWorker) WithMinMax

func (tw *TestWorker) WithMinMax(min, max int32) *TestWorker

WithMinMax sets values of Minimum and Maximum

func (*TestWorker) WithVolume

func (tw *TestWorker) WithVolume(vType string, size int) *TestWorker

WithVolume sets value of worker.Volume Type and Size

func (*TestWorker) WithZones

func (tw *TestWorker) WithZones(zones ...string) *TestWorker

WithZones adds zones to Zones

Jump to

Keyboard shortcuts

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