Documentation ¶
Index ¶
- type TestDataWriter
- type TestShoot
- func (ts *TestShoot) InNamespace(namespace string) *TestShoot
- func (ts *TestShoot) ToShoot() *v1beta1.Shoot
- func (ts *TestShoot) WithAutoUpdate(kubernetes, machine bool) *TestShoot
- func (ts *TestShoot) WithExposureClassName(exposureClassName string) *TestShoot
- func (ts *TestShoot) WithExtensions(extensions []gardener_types.Extension) *TestShoot
- func (ts *TestShoot) WithGeneration(generation int64) *TestShoot
- func (ts *TestShoot) WithHibernationState(hibernationPossible bool, hibernated bool) *TestShoot
- func (ts *TestShoot) WithKubernetesVersion(v string) *TestShoot
- func (ts *TestShoot) WithObservedGeneration(generation int64) *TestShoot
- func (ts *TestShoot) WithOperationError() *TestShoot
- func (ts *TestShoot) WithOperationFailed() *TestShoot
- func (ts *TestShoot) WithOperationNil() *TestShoot
- func (ts *TestShoot) WithOperationPending() *TestShoot
- func (ts *TestShoot) WithOperationProcessing() *TestShoot
- func (ts *TestShoot) WithOperationSucceeded() *TestShoot
- func (ts *TestShoot) WithPurpose(purpose string) *TestShoot
- func (ts *TestShoot) WithRateLimitExceededError() *TestShoot
- func (ts *TestShoot) WithWorkers(workers ...v1beta1.Worker) *TestShoot
- type TestWorker
- func (tw *TestWorker) ToWorker() v1beta1.Worker
- func (tw *TestWorker) WithMachineImageAndVersion(name string, version string) *TestWorker
- func (tw *TestWorker) WithMachineType(t string) *TestWorker
- func (tw *TestWorker) WithMaxSurge(max int) *TestWorker
- func (tw *TestWorker) WithMaxUnavailable(max int) *TestWorker
- func (tw *TestWorker) WithMinMax(min, max int32) *TestWorker
- func (tw *TestWorker) WithVolume(vType string, size int) *TestWorker
- func (tw *TestWorker) WithZones(zones ...string) *TestWorker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestDataWriter ¶
type TestDataWriter struct {
// contains filtered or unexported fields
}
TestDataWriter can be used for dumping test data such as shoot specs, and Graphql mutations to files It was introduced to support migration to Kyma Infrastructure Manager (https://github.com/kyma-project/infrastructure-manager/issues/185)
func NewTestDataWriter ¶
func NewTestDataWriter(shootNamespace, directory string, enabled bool) *TestDataWriter
func (*TestDataWriter) Enabled ¶
func (tdw *TestDataWriter) Enabled() bool
func (*TestDataWriter) PersistGraphQL ¶
func (tdw *TestDataWriter) PersistGraphQL(mutation gqlschema.ProvisionRuntimeInput) (string, error)
func (*TestDataWriter) PersistShoot ¶
func (tdw *TestDataWriter) PersistShoot(shoot *v1beta1.Shoot) (string, error)
type TestShoot ¶
type TestShoot struct {
// contains filtered or unexported fields
}
TestShoot allows construction of custom v1beta1.Shoot for testing purposes
func NewTestShoot ¶
NewTestShoot creates TestShoot and returns pointer to it, allowing to pipe the constraints
func (*TestShoot) InNamespace ¶
InNamespace adds namespace to shoot.ObjectMeta.Namespace
func (*TestShoot) WithAutoUpdate ¶
WithAutoUpdate sets values of shoot.Spec.Maintenance.AutoUpdate KubernetesVersion and MachineImageVersion fields
func (*TestShoot) WithExposureClassName ¶
func (*TestShoot) WithExtensions ¶
func (ts *TestShoot) WithExtensions(extensions []gardener_types.Extension) *TestShoot
WithExtensions adds gardener_types Extensions to shoot.Spec.Extensions.
func (*TestShoot) WithGeneration ¶
WithGeneration sets value of shoot.Generation field
func (*TestShoot) WithHibernationState ¶
WithHibernationState sets shoot.Status.IsHibernated and shoot.Status.Constraints
func (*TestShoot) WithKubernetesVersion ¶
WithKubernetesVersion sets value to shoot.Spec.Kubernetes.Version
func (*TestShoot) WithObservedGeneration ¶
WithObservedGeneration sets value of shoot.Status.ObservedGeneration
func (*TestShoot) WithOperationError ¶
WithOperationError marks shoot.Status.LastOperation.State as 'Error'
func (*TestShoot) WithOperationFailed ¶
WithOperationFailed marks shoot.Status.LastOperation.State as 'Failed'
func (*TestShoot) WithOperationNil ¶
WithOperationNil sets shoot.Status.LastOperation to nil
func (*TestShoot) WithOperationPending ¶
WithOperationPending marks shoot.Status.LastOperation.State as 'Pending'
func (*TestShoot) WithOperationProcessing ¶
WithOperationProcessing marks shoot.Status.LastOperation.State as 'Processing'
func (*TestShoot) WithOperationSucceeded ¶
WithOperationSucceeded marks shoot.Status.LastOperation.State as 'Succeeded'
func (*TestShoot) WithPurpose ¶
WithAutoUpdate sets values of shoot.Spec.Maintenance.AutoUpdate KubernetesVersion and MachineImageVersion fields
func (*TestShoot) WithRateLimitExceededError ¶
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