testing

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateVerify added in v0.4.0

func CertificateVerify(rootPEM, certPEM []byte, dnsName string) error

CertificateVerify verifies certificate with root certificate.

Types

type Catalog

type Catalog struct{}

Catalog provides several instances for tests

func (*Catalog) AnnotatedPod

func (c *Catalog) AnnotatedPod(name string, annotations map[string]string) corev1.Pod

AnnotatedPod defines a pod with annotations

func (*Catalog) BOSHDeploymentWithWrongTypeOps

func (c *Catalog) BOSHDeploymentWithWrongTypeOps(name, manifestRef string, opsRef string) bdv1.BOSHDeployment

BOSHDeploymentWithWrongTypeOps a deployment CR with wrong type ops

func (*Catalog) BOSHManifestCFRouting added in v0.3.0

func (c *Catalog) BOSHManifestCFRouting() (*manifest.Manifest, error)

BOSHManifestCFRouting returns a manifest for the CF routing release with an underscore in the name

func (*Catalog) BOSHManifestConfigMapWithTwoInstanceGroups added in v0.4.0

func (c *Catalog) BOSHManifestConfigMapWithTwoInstanceGroups(name string) corev1.ConfigMap

BOSHManifestConfigMapWithTwoInstanceGroups for tests

func (*Catalog) BOSHManifestSecret added in v1.0.0

func (c *Catalog) BOSHManifestSecret(ref string, text string) corev1.Secret

BOSHManifestSecret for tests

func (*Catalog) BOSHManifestWithAbsentBPMInfo added in v0.3.0

func (c *Catalog) BOSHManifestWithAbsentBPMInfo() (*manifest.Manifest, error)

BOSHManifestWithAbsentBPMInfo for data gathering tests

func (*Catalog) BOSHManifestWithBPMRelease added in v0.3.0

func (c *Catalog) BOSHManifestWithBPMRelease() (*manifest.Manifest, error)

BOSHManifestWithBPMRelease returns a manifest with single BPM configuration

func (c *Catalog) BOSHManifestWithExternalLinks() (*manifest.Manifest, error)

BOSHManifestWithExternalLinks returns a manifest with external links Also usable in integration tests

func (*Catalog) BOSHManifestWithGlobalUpdateBlock added in v1.0.0

func (c *Catalog) BOSHManifestWithGlobalUpdateBlock() (*manifest.Manifest, error)

BOSHManifestWithGlobalUpdateBlock returns a manifest with a global update block

func (c *Catalog) BOSHManifestWithLinks() (*manifest.Manifest, error)

BOSHManifestWithLinks returns a manifest with explicit and implicit BOSH links Also usable in integration tests

func (*Catalog) BOSHManifestWithMultiBPMProcesses added in v0.3.0

func (c *Catalog) BOSHManifestWithMultiBPMProcesses() (*manifest.Manifest, error)

BOSHManifestWithMultiBPMProcesses returns a manifest with multi BPM configuration

func (*Catalog) BOSHManifestWithMultiBPMProcessesAndPersistentDisk added in v0.3.0

func (c *Catalog) BOSHManifestWithMultiBPMProcessesAndPersistentDisk() (*manifest.Manifest, error)

BOSHManifestWithMultiBPMProcessesAndPersistentDisk returns a manifest with multi BPM configuration and persistent disk

func (*Catalog) BOSHManifestWithNilConsume added in v1.0.0

func (c *Catalog) BOSHManifestWithNilConsume() (*manifest.Manifest, error)

BOSHManifestWithNilConsume returns a manifest with a nil consume for the job

func (*Catalog) BOSHManifestWithOverriddenBPMInfo added in v0.3.0

func (c *Catalog) BOSHManifestWithOverriddenBPMInfo() (*manifest.Manifest, error)

BOSHManifestWithOverriddenBPMInfo for data gathering tests

func (*Catalog) BOSHManifestWithProviderAndConsumer

func (c *Catalog) BOSHManifestWithProviderAndConsumer() (*manifest.Manifest, error)

BOSHManifestWithProviderAndConsumer for data gathering tests

func (*Catalog) BOSHManifestWithResources added in v1.0.0

func (c *Catalog) BOSHManifestWithResources() (*manifest.Manifest, error)

BOSHManifestWithResources for data gathering tests

func (*Catalog) BOSHManifestWithUpdateSerial added in v1.0.0

func (c *Catalog) BOSHManifestWithUpdateSerial() (*manifest.Manifest, error)

BOSHManifestWithUpdateSerial returns a manifest with update serial

func (*Catalog) BOSHManifestWithUpdateSerialAndWithoutPorts added in v1.0.0

func (c *Catalog) BOSHManifestWithUpdateSerialAndWithoutPorts() (*manifest.Manifest, error)

BOSHManifestWithUpdateSerialAndWithoutPorts returns a manifest with update serial and without ports

func (*Catalog) BOSHManifestWithUpdateSerialInManifest added in v1.0.0

func (c *Catalog) BOSHManifestWithUpdateSerialInManifest() (*manifest.Manifest, error)

BOSHManifestWithUpdateSerialInManifest returns a manifest with update serial in manifest

func (*Catalog) BOSHManifestWithZeroInstances added in v1.0.0

func (c *Catalog) BOSHManifestWithZeroInstances() (*manifest.Manifest, error)

BOSHManifestWithZeroInstances for data gathering tests

func (*Catalog) BPMReleaseWithAffinity added in v0.3.1

func (c *Catalog) BPMReleaseWithAffinity() (*manifest.Manifest, error)

BPMReleaseWithAffinity returns a manifest with affinity

func (*Catalog) BPMReleaseWithAffinityConfigMap added in v0.3.1

func (c *Catalog) BPMReleaseWithAffinityConfigMap(name string) corev1.ConfigMap

BPMReleaseWithAffinityConfigMap for tests

func (*Catalog) CustomOpsConfigMap added in v1.0.0

func (c *Catalog) CustomOpsConfigMap(name string, change string) corev1.ConfigMap

CustomOpsConfigMap is an operations file with a custom structural change

func (*Catalog) CustomOpsSecret added in v1.0.0

func (c *Catalog) CustomOpsSecret(name string, change string) corev1.Secret

CustomOpsSecret is an operations file with a custom structural change

func (*Catalog) DefaultBOSHDeployment

func (c *Catalog) DefaultBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment

DefaultBOSHDeployment a deployment CR

func (*Catalog) DefaultBOSHDeploymentWithOps

func (c *Catalog) DefaultBOSHDeploymentWithOps(name, manifestRef string, opsRef string) bdv1.BOSHDeployment

DefaultBOSHDeploymentWithOps a deployment CR with ops

func (*Catalog) DefaultBOSHManifest

func (c *Catalog) DefaultBOSHManifest() (*manifest.Manifest, error)

DefaultBOSHManifest returns a BOSH manifest for unit tests

func (*Catalog) DefaultBOSHManifestConfigMap

func (c *Catalog) DefaultBOSHManifestConfigMap(name string) corev1.ConfigMap

DefaultBOSHManifestConfigMap for integration tests

func (*Catalog) DefaultCA

func (c *Catalog) DefaultCA(name string, ca credsgen.Certificate) corev1.Secret

DefaultCA for use in tests

func (*Catalog) DefaultConfig

func (c *Catalog) DefaultConfig() *config.Config

DefaultConfig for tests

func (*Catalog) DefaultConfigMap

func (c *Catalog) DefaultConfigMap(name string) corev1.ConfigMap

DefaultConfigMap for tests

func (*Catalog) DefaultPod

func (c *Catalog) DefaultPod(name string) corev1.Pod

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) DefaultPodTemplateWithActiveLabel added in v1.0.0

func (c *Catalog) DefaultPodTemplateWithActiveLabel(name string) corev1.PodTemplateSpec

DefaultPodTemplateWithActiveLabel defines a pod template with a simple web server useful for testing

func (*Catalog) DefaultQuarksLinkSecret added in v1.0.0

func (c *Catalog) DefaultQuarksLinkSecret(deploymentName, linkType string) corev1.Secret

DefaultQuarksLinkSecret has default values from the nats release

func (*Catalog) DefaultQuarksSecret added in v1.0.0

func (c *Catalog) DefaultQuarksSecret(name string) qsv1a1.QuarksSecret

DefaultQuarksSecret for use in tests

func (*Catalog) DefaultQuarksStatefulSet added in v1.0.0

func (c *Catalog) DefaultQuarksStatefulSet(name string) qstsv1a1.QuarksStatefulSet

DefaultQuarksStatefulSet for use in tests

func (*Catalog) DefaultSecret

func (c *Catalog) DefaultSecret(name string) corev1.Secret

DefaultSecret for tests

func (*Catalog) DefaultStatefulSet

func (c *Catalog) DefaultStatefulSet(name string) appsv1.StatefulSet

DefaultStatefulSet for use in tests

func (*Catalog) DefaultStatefulSetWithActiveSinglePod added in v1.0.0

func (c *Catalog) DefaultStatefulSetWithActiveSinglePod(name string) appsv1.StatefulSet

DefaultStatefulSetWithActiveSinglePod for use in tests

func (*Catalog) DefaultStatefulSetWithReplicasN added in v1.0.0

func (c *Catalog) DefaultStatefulSetWithReplicasN(name string) appsv1.StatefulSet

DefaultStatefulSetWithReplicasN 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, storageClassName 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

func (c *Catalog) ElaboratedBOSHManifest() (*manifest.Manifest, error)

ElaboratedBOSHManifest for data gathering tests

func (*Catalog) EmptyBOSHDeployment

func (c *Catalog) EmptyBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment

EmptyBOSHDeployment empty deployment CR

func (*Catalog) EntangledPod added in v1.0.0

func (c *Catalog) EntangledPod(deploymentName string) corev1.Pod

EntangledPod is a pod which has annotations for a BOSH link

func (*Catalog) InterpolateBOSHDeployment

func (c *Catalog) InterpolateBOSHDeployment(name, manifestRef, opsRef string, secretRef string) bdv1.BOSHDeployment

InterpolateBOSHDeployment a deployment CR

func (*Catalog) InterpolateOpsConfigMap

func (c *Catalog) InterpolateOpsConfigMap(name string) corev1.ConfigMap

InterpolateOpsConfigMap for ops interpolate configmap tests

func (*Catalog) InterpolateOpsIncorrectSecret

func (c *Catalog) InterpolateOpsIncorrectSecret(name string) corev1.Secret

InterpolateOpsIncorrectSecret for ops interpolate incorrect secret tests

func (*Catalog) InterpolateOpsSecret

func (c *Catalog) InterpolateOpsSecret(name string) corev1.Secret

InterpolateOpsSecret for ops interpolate secret tests

func (*Catalog) LabeledPod

func (c *Catalog) LabeledPod(name string, labels map[string]string) corev1.Pod

LabeledPod defines a pod with labels and a simple web server

func (*Catalog) NatsConfigMap added in v1.0.0

func (c *Catalog) NatsConfigMap(deployName string) corev1.ConfigMap

NatsConfigMap for use in tests

func (*Catalog) NatsPod added in v1.0.0

func (c *Catalog) NatsPod(deployName string) corev1.Pod

NatsPod for use in tests

func (*Catalog) NatsSecret added in v1.0.0

func (c *Catalog) NatsSecret(deployName string) corev1.Secret

NatsSecret for use in tests

func (*Catalog) NatsService added in v1.0.0

func (c *Catalog) NatsService(deployName string) corev1.Service

NatsService for use in tests

func (*Catalog) NodePortService added in v0.4.2

func (c *Catalog) NodePortService(name, ig string, targetPort int32) corev1.Service

NodePortService returns a Service of type NodePort

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) OwnedReferencesQuarksStatefulSet added in v1.0.0

func (c *Catalog) OwnedReferencesQuarksStatefulSet(name string) qstsv1a1.QuarksStatefulSet

OwnedReferencesQuarksStatefulSet for use in tests

func (*Catalog) OwnedReferencesStatefulSet

func (c *Catalog) OwnedReferencesStatefulSet(name string) appsv1.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) QstsWithActiveSinglePod added in v1.0.0

func (c *Catalog) QstsWithActiveSinglePod(name string, cmd []string) qstsv1a1.QuarksStatefulSet

QstsWithActiveSinglePod for use in tests

func (*Catalog) QstsWithProbeMultiplePods added in v1.0.0

func (c *Catalog) QstsWithProbeMultiplePods(name string, cmd []string) qstsv1a1.QuarksStatefulSet

QstsWithProbeMultiplePods for use in tests

func (*Catalog) QstsWithProbeSinglePod added in v1.0.0

func (c *Catalog) QstsWithProbeSinglePod(name string, cmd []string) qstsv1a1.QuarksStatefulSet

QstsWithProbeSinglePod for use in tests

func (*Catalog) QstsWithoutProbeMultiplePods added in v1.0.0

func (c *Catalog) QstsWithoutProbeMultiplePods(name string, cmd []string) qstsv1a1.QuarksStatefulSet

QstsWithoutProbeMultiplePods for use in tests

func (*Catalog) QuarksLinkSecret added in v1.0.0

func (c *Catalog) QuarksLinkSecret(deploymentName, igName, linkType, linkName, value string) corev1.Secret

QuarksLinkSecret returns a link secret, as generated for consumption by an external (non BOSH) consumer

func (*Catalog) QuarksStatefulSetWithPVC added in v1.0.0

func (c *Catalog) QuarksStatefulSetWithPVC(name, pvcName string, storageClassName string) qstsv1a1.QuarksStatefulSet

QuarksStatefulSetWithPVC for use in tests

func (*Catalog) SecretBOSHDeployment added in v1.0.0

func (c *Catalog) SecretBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment

SecretBOSHDeployment a deployment CR which expectes the BOSH manifest in a secret. The name needs to match the name inside the referenced manifest.

func (*Catalog) Sleep1hPodSpec

func (c *Catalog) Sleep1hPodSpec() corev1.PodSpec

Sleep1hPodSpec defines a simple pod that sleeps 60*60s for testing

func (*Catalog) StatefulSetWithPVC

func (c *Catalog) StatefulSetWithPVC(name, pvcName string, storageClassName string) appsv1.StatefulSet

StatefulSetWithPVC for use in tests

func (*Catalog) StorageClassSecret added in v0.3.1

func (c *Catalog) StorageClassSecret(name string, class string) corev1.Secret

StorageClassSecret for 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) WrongQuarksStatefulSet added in v1.0.0

func (c *Catalog) WrongQuarksStatefulSet(name string) qstsv1a1.QuarksStatefulSet

WrongQuarksStatefulSet for use in tests

func (*Catalog) WrongQuarksStatefulSetWithPVC added in v1.0.0

func (c *Catalog) WrongQuarksStatefulSetWithPVC(name, pvcName string, storageClassName string) qstsv1a1.QuarksStatefulSet

WrongQuarksStatefulSetWithPVC for use in tests

func (*Catalog) WrongStatefulSet

func (c *Catalog) WrongStatefulSet(name string) appsv1.StatefulSet

WrongStatefulSet for use in tests

func (*Catalog) WrongStatefulSetWithPVC

func (c *Catalog) WrongStatefulSetWithPVC(name, pvcName string, storageClassName string) appsv1.StatefulSet

WrongStatefulSetWithPVC for use in tests

func (*Catalog) WrongTypeBOSHDeployment

func (c *Catalog) WrongTypeBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment

WrongTypeBOSHDeployment a deployment CR containing wrong type

Directories

Path Synopsis
Package boshmanifest contains text assets for BOSH manifests and ops files
Package boshmanifest contains text assets for BOSH manifests and ops files

Jump to

Keyboard shortcuts

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