Documentation
¶
Overview ¶
Package testing contains methods to create test data. It's a seaparate package to avoid import cycles. Helper functions can be found in the package `testhelper`.
Index ¶
- func NewContext() context.Context
- type Catalog
- func (c *Catalog) AnnotatedPod(name string, annotations map[string]string) corev1.Pod
- func (c *Catalog) AutoErrandExtendedJob(name string) ejv1.ExtendedJob
- func (c *Catalog) BOSHDeploymentWithWrongTypeOps(name, manifestRef string, opsRef string) bdcv1.BOSHDeployment
- func (c *Catalog) BOSHManifestWithProviderAndConsumer() *manifest.Manifest
- func (c *Catalog) CmdPodTemplate(cmd []string) corev1.PodTemplateSpec
- func (c *Catalog) ComplexMatchExtendedJob(name string) *ejv1.ExtendedJob
- func (c *Catalog) ConfigPodTemplate() corev1.PodTemplateSpec
- func (c *Catalog) DefaultBOSHDeployment(name, manifestRef string) bdcv1.BOSHDeployment
- func (c *Catalog) DefaultBOSHDeploymentWithOps(name, manifestRef string, opsRef string) bdcv1.BOSHDeployment
- func (c *Catalog) DefaultBOSHManifest() manifest.Manifest
- func (c *Catalog) DefaultBOSHManifestConfigMap(name string) corev1.ConfigMap
- func (c *Catalog) DefaultCA(name string, ca credsgen.Certificate) corev1.Secret
- func (c *Catalog) DefaultConfig() *config.Config
- func (c *Catalog) DefaultConfigMap(name string) corev1.ConfigMap
- func (c *Catalog) DefaultExtendedJob(name string) *ejv1.ExtendedJob
- func (c *Catalog) DefaultExtendedJobWithSucceededJob(name string) (*ejv1.ExtendedJob, *batchv1.Job, *corev1.Pod)
- func (c *Catalog) DefaultExtendedSecret(name string) esv1.ExtendedSecret
- func (c *Catalog) DefaultExtendedStatefulSet(name string) essv1.ExtendedStatefulSet
- func (c *Catalog) DefaultPod(name string) corev1.Pod
- func (c *Catalog) DefaultPodTemplate(name string) corev1.PodTemplateSpec
- func (c *Catalog) DefaultSecret(name string) corev1.Secret
- func (c *Catalog) DefaultStatefulSet(name string) v1beta2.StatefulSet
- func (c *Catalog) DefaultStorageClass(name string) storagev1.StorageClass
- func (c *Catalog) DefaultVolumeClaimTemplates(name string) []corev1.PersistentVolumeClaim
- func (c *Catalog) DefaultVolumeMount(name string) corev1.VolumeMount
- func (c *Catalog) ElaboratedBOSHManifest() *manifest.Manifest
- func (c *Catalog) EmptyBOSHDeployment(name, manifestRef string) bdcv1.BOSHDeployment
- func (c *Catalog) ErrandExtendedJob(name string) ejv1.ExtendedJob
- func (c *Catalog) ExtendedStatefulSetWithPVC(name, pvcName string) essv1.ExtendedStatefulSet
- func (c *Catalog) FailingMultiContainerPodTemplate(cmd []string) corev1.PodTemplateSpec
- func (c *Catalog) InterpolateBOSHDeployment(name, manifestRef, opsRef string, secretRef string) bdcv1.BOSHDeployment
- func (c *Catalog) InterpolateOpsConfigMap(name string) corev1.ConfigMap
- func (c *Catalog) InterpolateOpsIncorrectSecret(name string) corev1.Secret
- func (c *Catalog) InterpolateOpsSecret(name string) corev1.Secret
- func (c *Catalog) LabelTriggeredExtendedJob(name string, state ejv1.PodState, ml labels.Set, me []*ejv1.Requirement, ...) *ejv1.ExtendedJob
- func (c *Catalog) LabeledPod(name string, labels map[string]string) corev1.Pod
- func (c *Catalog) LongRunningExtendedJob(name string) *ejv1.ExtendedJob
- func (c *Catalog) MatchExpressionExtendedJob(name string) *ejv1.ExtendedJob
- func (c *Catalog) MultiContainerPodTemplate(cmd []string) corev1.PodTemplateSpec
- func (c *Catalog) OnDeleteExtendedJob(name string) *ejv1.ExtendedJob
- func (c *Catalog) OutputExtendedJob(name string, template corev1.PodTemplateSpec) *ejv1.ExtendedJob
- func (c *Catalog) OwnedReferencesExtendedStatefulSet(name string) essv1.ExtendedStatefulSet
- func (c *Catalog) OwnedReferencesPodTemplate(name string) corev1.PodTemplateSpec
- func (c *Catalog) OwnedReferencesStatefulSet(name string) v1beta2.StatefulSet
- func (c *Catalog) PodTemplateWithLabelsAndMount(name string, labels map[string]string, pvcName string) corev1.PodTemplateSpec
- func (c *Catalog) Sleep1hPodSpec() corev1.PodSpec
- func (c *Catalog) StatefulSetWithPVC(name, pvcName string) v1beta2.StatefulSet
- func (c *Catalog) WrongExtendedStatefulSet(name string) essv1.ExtendedStatefulSet
- func (c *Catalog) WrongExtendedStatefulSetWithPVC(name, pvcName string) essv1.ExtendedStatefulSet
- func (c *Catalog) WrongPodTemplate(name string) corev1.PodTemplateSpec
- func (c *Catalog) WrongPodTemplateWithLabelsAndMount(name string, labels map[string]string, pvcName string) corev1.PodTemplateSpec
- func (c *Catalog) WrongStatefulSet(name string) v1beta2.StatefulSet
- func (c *Catalog) WrongStatefulSetWithPVC(name, pvcName string) v1beta2.StatefulSet
- func (c *Catalog) WrongTypeBOSHDeployment(name, manifestRef string) bdcv1.BOSHDeployment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Catalog ¶
type Catalog struct{}
Catalog provides several instances for tests
func (*Catalog) AnnotatedPod ¶
AnnotatedPod defines a pod with annotations
func (*Catalog) AutoErrandExtendedJob ¶
func (c *Catalog) AutoErrandExtendedJob(name string) ejv1.ExtendedJob
AutoErrandExtendedJob default values
func (*Catalog) BOSHDeploymentWithWrongTypeOps ¶
func (c *Catalog) BOSHDeploymentWithWrongTypeOps(name, manifestRef string, opsRef string) bdcv1.BOSHDeployment
BOSHDeploymentWithWrongTypeOps fissile deployment CR with wrong type ops
func (*Catalog) BOSHManifestWithProviderAndConsumer ¶
BOSHManifestWithProviderAndConsumer for data gathering tests
func (*Catalog) CmdPodTemplate ¶
func (c *Catalog) CmdPodTemplate(cmd []string) corev1.PodTemplateSpec
CmdPodTemplate returns the spec with a given command for busybox
func (*Catalog) ComplexMatchExtendedJob ¶
func (c *Catalog) ComplexMatchExtendedJob(name string) *ejv1.ExtendedJob
ComplexMatchExtendedJob uses MatchLabels and MatchExpressions
func (*Catalog) ConfigPodTemplate ¶
func (c *Catalog) ConfigPodTemplate() corev1.PodTemplateSpec
ConfigPodTemplate returns the spec with a given command for busybox
func (*Catalog) DefaultBOSHDeployment ¶
func (c *Catalog) DefaultBOSHDeployment(name, manifestRef string) bdcv1.BOSHDeployment
DefaultBOSHDeployment fissile deployment CR
func (*Catalog) DefaultBOSHDeploymentWithOps ¶
func (c *Catalog) DefaultBOSHDeploymentWithOps(name, manifestRef string, opsRef string) bdcv1.BOSHDeployment
DefaultBOSHDeploymentWithOps fissile deployment CR with ops
func (*Catalog) DefaultBOSHManifest ¶
DefaultBOSHManifest for tests
func (*Catalog) DefaultBOSHManifestConfigMap ¶
DefaultBOSHManifestConfigMap for tests
func (*Catalog) DefaultCA ¶
DefaultCA for use in tests
func (*Catalog) DefaultConfig ¶
DefaultConfig for tests
func (*Catalog) DefaultConfigMap ¶
DefaultConfigMap for tests
func (*Catalog) DefaultExtendedJob ¶
func (c *Catalog) DefaultExtendedJob(name string) *ejv1.ExtendedJob
DefaultExtendedJob default values
func (*Catalog) DefaultExtendedJobWithSucceededJob ¶
func (c *Catalog) DefaultExtendedJobWithSucceededJob(name string) (*ejv1.ExtendedJob, *batchv1.Job, *corev1.Pod)
DefaultExtendedJobWithSucceededJob returns an ExtendedJob and a Job owned by it
func (*Catalog) DefaultExtendedSecret ¶
func (c *Catalog) DefaultExtendedSecret(name string) esv1.ExtendedSecret
DefaultExtendedSecret for use in tests
func (*Catalog) DefaultExtendedStatefulSet ¶
func (c *Catalog) DefaultExtendedStatefulSet(name string) essv1.ExtendedStatefulSet
DefaultExtendedStatefulSet for use in tests
func (*Catalog) DefaultPod ¶
DefaultPod defines a pod with a simple web server useful for testing
func (*Catalog) DefaultPodTemplate ¶
func (c *Catalog) DefaultPodTemplate(name string) corev1.PodTemplateSpec
DefaultPodTemplate defines a pod template with a simple web server useful for testing
func (*Catalog) DefaultSecret ¶
DefaultSecret for tests
func (*Catalog) DefaultStatefulSet ¶
func (c *Catalog) DefaultStatefulSet(name string) v1beta2.StatefulSet
DefaultStatefulSet for use in tests
func (*Catalog) DefaultStorageClass ¶
func (c *Catalog) DefaultStorageClass(name string) storagev1.StorageClass
DefaultStorageClass for use in tests
func (*Catalog) DefaultVolumeClaimTemplates ¶
func (c *Catalog) DefaultVolumeClaimTemplates(name string) []corev1.PersistentVolumeClaim
DefaultVolumeClaimTemplates for use in tests
func (*Catalog) DefaultVolumeMount ¶
func (c *Catalog) DefaultVolumeMount(name string) corev1.VolumeMount
DefaultVolumeMount for use in tests
func (*Catalog) ElaboratedBOSHManifest ¶
ElaboratedBOSHManifest for data gathering tests
func (*Catalog) EmptyBOSHDeployment ¶
func (c *Catalog) EmptyBOSHDeployment(name, manifestRef string) bdcv1.BOSHDeployment
EmptyBOSHDeployment empty fissile deployment CR
func (*Catalog) ErrandExtendedJob ¶
func (c *Catalog) ErrandExtendedJob(name string) ejv1.ExtendedJob
ErrandExtendedJob default values
func (*Catalog) ExtendedStatefulSetWithPVC ¶
func (c *Catalog) ExtendedStatefulSetWithPVC(name, pvcName string) essv1.ExtendedStatefulSet
ExtendedStatefulSetWithPVC for use in tests
func (*Catalog) FailingMultiContainerPodTemplate ¶
func (c *Catalog) FailingMultiContainerPodTemplate(cmd []string) corev1.PodTemplateSpec
FailingMultiContainerPodTemplate returns a spec with a given command for busybox and a second container which fails
func (*Catalog) InterpolateBOSHDeployment ¶
func (c *Catalog) InterpolateBOSHDeployment(name, manifestRef, opsRef string, secretRef string) bdcv1.BOSHDeployment
InterpolateBOSHDeployment fissile deployment CR
func (*Catalog) InterpolateOpsConfigMap ¶
InterpolateOpsConfigMap for ops interpolate configmap tests
func (*Catalog) InterpolateOpsIncorrectSecret ¶
InterpolateOpsIncorrectSecret for ops interpolate incorrect secret tests
func (*Catalog) InterpolateOpsSecret ¶
InterpolateOpsSecret for ops interpolate secret tests
func (*Catalog) LabelTriggeredExtendedJob ¶
func (c *Catalog) LabelTriggeredExtendedJob(name string, state ejv1.PodState, ml labels.Set, me []*ejv1.Requirement, cmd []string) *ejv1.ExtendedJob
LabelTriggeredExtendedJob allows customization of labels triggers
func (*Catalog) LabeledPod ¶
LabeledPod defines a pod with labels and a simple web server
func (*Catalog) LongRunningExtendedJob ¶
func (c *Catalog) LongRunningExtendedJob(name string) *ejv1.ExtendedJob
LongRunningExtendedJob has a longer sleep time
func (*Catalog) MatchExpressionExtendedJob ¶
func (c *Catalog) MatchExpressionExtendedJob(name string) *ejv1.ExtendedJob
MatchExpressionExtendedJob uses Matchexpressions for matching
func (*Catalog) MultiContainerPodTemplate ¶
func (c *Catalog) MultiContainerPodTemplate(cmd []string) corev1.PodTemplateSpec
MultiContainerPodTemplate returns the spec with two containers running a given command for busybox
func (*Catalog) OnDeleteExtendedJob ¶
func (c *Catalog) OnDeleteExtendedJob(name string) *ejv1.ExtendedJob
OnDeleteExtendedJob runs for deleted pods
func (*Catalog) OutputExtendedJob ¶
func (c *Catalog) OutputExtendedJob(name string, template corev1.PodTemplateSpec) *ejv1.ExtendedJob
OutputExtendedJob persists its output
func (*Catalog) OwnedReferencesExtendedStatefulSet ¶
func (c *Catalog) OwnedReferencesExtendedStatefulSet(name string) essv1.ExtendedStatefulSet
OwnedReferencesExtendedStatefulSet for use in tests
func (*Catalog) OwnedReferencesPodTemplate ¶
func (c *Catalog) OwnedReferencesPodTemplate(name string) corev1.PodTemplateSpec
OwnedReferencesPodTemplate defines a pod template with four references from VolumeSources, EnvFrom and Env
func (*Catalog) OwnedReferencesStatefulSet ¶
func (c *Catalog) OwnedReferencesStatefulSet(name string) v1beta2.StatefulSet
OwnedReferencesStatefulSet for use in tests
func (*Catalog) PodTemplateWithLabelsAndMount ¶
func (c *Catalog) PodTemplateWithLabelsAndMount(name string, labels map[string]string, pvcName string) corev1.PodTemplateSpec
PodTemplateWithLabelsAndMount defines a pod template with a simple web server useful for testing
func (*Catalog) Sleep1hPodSpec ¶
Sleep1hPodSpec defines a simple pod that sleeps 60*60s for testing
func (*Catalog) StatefulSetWithPVC ¶
func (c *Catalog) StatefulSetWithPVC(name, pvcName string) v1beta2.StatefulSet
StatefulSetWithPVC for use in tests
func (*Catalog) WrongExtendedStatefulSet ¶
func (c *Catalog) WrongExtendedStatefulSet(name string) essv1.ExtendedStatefulSet
WrongExtendedStatefulSet for use in tests
func (*Catalog) WrongExtendedStatefulSetWithPVC ¶
func (c *Catalog) WrongExtendedStatefulSetWithPVC(name, pvcName string) essv1.ExtendedStatefulSet
WrongExtendedStatefulSetWithPVC for use in tests
func (*Catalog) WrongPodTemplate ¶
func (c *Catalog) WrongPodTemplate(name string) corev1.PodTemplateSpec
WrongPodTemplate defines a pod template with a simple web server useful for testing
func (*Catalog) WrongPodTemplateWithLabelsAndMount ¶
func (c *Catalog) WrongPodTemplateWithLabelsAndMount(name string, labels map[string]string, pvcName string) corev1.PodTemplateSpec
WrongPodTemplateWithLabelsAndMount defines a pod template with a simple web server useful for testing
func (*Catalog) WrongStatefulSet ¶
func (c *Catalog) WrongStatefulSet(name string) v1beta2.StatefulSet
WrongStatefulSet for use in tests
func (*Catalog) WrongStatefulSetWithPVC ¶
func (c *Catalog) WrongStatefulSetWithPVC(name, pvcName string) v1beta2.StatefulSet
WrongStatefulSetWithPVC for use in tests
func (*Catalog) WrongTypeBOSHDeployment ¶
func (c *Catalog) WrongTypeBOSHDeployment(name, manifestRef string) bdcv1.BOSHDeployment
WrongTypeBOSHDeployment fissile deployment CR containing wrong type
Source Files
¶
- catalog.go