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 JSONDump(props interface{})
- func PrettyPrint(i interface{}) string
- type Catalog
- func (c *Catalog) AnnotatedPod(name string, annotations map[string]string) corev1.Pod
- func (c *Catalog) BOSHDeploymentWithWrongTypeOps(name, manifestRef string, opsRef string) bdv1.BOSHDeployment
- func (c *Catalog) BOSHManifestCFRouting() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestConfigMap(name string, text string) corev1.ConfigMap
- func (c *Catalog) BOSHManifestFromKubeCF641() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestSecret(name string, text string) corev1.Secret
- func (c *Catalog) BOSHManifestWithAbsentBPMInfo() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithActivePassiveProbes() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithBPMRelease() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithExternalLinks() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithGlobalUpdateBlock() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithLinks() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithMultiBPMProcesses() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithMultiBPMProcessesAndPersistentDisk() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithNilConsume() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithOverriddenBPMInfo() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithProviderAndConsumer() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithResources() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithUpdateSerial() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithUpdateSerialAndWithoutPorts() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithUpdateSerialInManifest() (*manifest.Manifest, error)
- func (c *Catalog) BOSHManifestWithZeroInstances() (*manifest.Manifest, error)
- func (c *Catalog) BPMReleaseWithAffinity() (*manifest.Manifest, error)
- func (c *Catalog) BPMReleaseWithTolerations() (*manifest.Manifest, error)
- func (c *Catalog) CustomOpsConfigMap(name string, change string) corev1.ConfigMap
- func (c *Catalog) CustomOpsSecret(name string, change string) corev1.Secret
- func (c *Catalog) DefaultBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment
- func (c *Catalog) DefaultBOSHDeploymentWithOps(name, manifestRef string, opsRef string) bdv1.BOSHDeployment
- func (c *Catalog) DefaultBOSHManifest() (*manifest.Manifest, error)
- func (c *Catalog) DefaultCA(name string, ca credsgen.Certificate) corev1.Secret
- func (c *Catalog) DefaultConfig() *config.Config
- func (c *Catalog) DefaultPod(name string) corev1.Pod
- func (c *Catalog) DefaultQuarksLinkSecret(deploymentName, linkType string) corev1.Secret
- func (c *Catalog) DummyService(serviceName string) corev1.Service
- func (c *Catalog) EchoContainer(name string) corev1.Container
- func (c *Catalog) ElaboratedBOSHManifest() (*manifest.Manifest, error)
- func (c *Catalog) EmptyBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment
- func (c *Catalog) EntangledPod(deploymentName string) corev1.Pod
- func (c *Catalog) InterpolateBOSHDeployment(name, manifestRef, opsRef string, secretRef string) bdv1.BOSHDeployment
- func (c *Catalog) NatsConfigMap(deployName string) corev1.ConfigMap
- func (c *Catalog) NatsEndpoints(deployName string) corev1.Endpoints
- func (c *Catalog) NatsOtherSecret(deployName string) corev1.Secret
- func (c *Catalog) NatsPod(deployName string) corev1.Pod
- func (c *Catalog) NatsSecret(deployName string) corev1.Secret
- func (c *Catalog) NatsService(deployName string) corev1.Service
- func (c *Catalog) NatsServiceExternalName(deployName string) corev1.Service
- func (c *Catalog) NatsServiceForEndpoint(deployName string) corev1.Service
- func (c *Catalog) NodePortService(name, ig string, targetPort int32) corev1.Service
- func (c *Catalog) PodWithTailLogsContainer(podName string, parentPodCmd string, parentCName string, sidecardCName string, ...) corev1.Pod
- func (c *Catalog) QuarksLinkSecret(deploymentName, linkType, linkName string, value map[string][]byte) corev1.Secret
- func (c *Catalog) SecretBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment
- func (c *Catalog) Sleep1hPodSpec() corev1.PodSpec
- func (c *Catalog) StorageClassSecret(name string, class string) corev1.Secret
- func (c *Catalog) UserExplicitPassword(name, password string) corev1.Secret
- func (c *Catalog) VersionedSecret(name string) corev1.Secret
- func (c *Catalog) WaitingPod(name string, serviceList ...string) corev1.Pod
- func (c *Catalog) WrongTypeBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyPrint ¶
func PrettyPrint(i interface{}) string
PrettyPrint returns the interface as indented JSON
Types ¶
type Catalog ¶
type Catalog struct{}
Catalog provides several instances for tests
func (*Catalog) AnnotatedPod ¶
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 ¶
BOSHManifestCFRouting returns a manifest for the CF routing release with an underscore in the name
func (*Catalog) BOSHManifestConfigMap ¶
BOSHManifestConfigMap creates a config map containing the BOSH manifest
func (*Catalog) BOSHManifestFromKubeCF641 ¶
BOSHManifestFromKubeCF641 for "real-life" tests
func (*Catalog) BOSHManifestSecret ¶
BOSHManifestSecret returns a secret containing the BOSH manifest
func (*Catalog) BOSHManifestWithAbsentBPMInfo ¶
BOSHManifestWithAbsentBPMInfo for data gathering tests
func (*Catalog) BOSHManifestWithActivePassiveProbes ¶
BOSHManifestWithActivePassiveProbes returns a manifest with an active/passive probe
func (*Catalog) BOSHManifestWithBPMRelease ¶
BOSHManifestWithBPMRelease returns a manifest with single BPM configuration
func (*Catalog) BOSHManifestWithExternalLinks ¶
BOSHManifestWithExternalLinks returns a manifest with external links Also usable in integration tests
func (*Catalog) BOSHManifestWithGlobalUpdateBlock ¶
BOSHManifestWithGlobalUpdateBlock returns a manifest with a global update block
func (*Catalog) BOSHManifestWithLinks ¶
BOSHManifestWithLinks returns a manifest with explicit and implicit BOSH links Also usable in integration tests
func (*Catalog) BOSHManifestWithMultiBPMProcesses ¶
BOSHManifestWithMultiBPMProcesses returns a manifest with multi BPM configuration
func (*Catalog) BOSHManifestWithMultiBPMProcessesAndPersistentDisk ¶
BOSHManifestWithMultiBPMProcessesAndPersistentDisk returns a manifest with multi BPM configuration and persistent disk
func (*Catalog) BOSHManifestWithNilConsume ¶
BOSHManifestWithNilConsume returns a manifest with a nil consume for the job
func (*Catalog) BOSHManifestWithOverriddenBPMInfo ¶
BOSHManifestWithOverriddenBPMInfo for data gathering tests
func (*Catalog) BOSHManifestWithProviderAndConsumer ¶
BOSHManifestWithProviderAndConsumer for data gathering tests
func (*Catalog) BOSHManifestWithResources ¶
BOSHManifestWithResources for data gathering tests
func (*Catalog) BOSHManifestWithUpdateSerial ¶
BOSHManifestWithUpdateSerial returns a manifest with update serial
func (*Catalog) BOSHManifestWithUpdateSerialAndWithoutPorts ¶
BOSHManifestWithUpdateSerialAndWithoutPorts returns a manifest with update serial and without ports
func (*Catalog) BOSHManifestWithUpdateSerialInManifest ¶
BOSHManifestWithUpdateSerialInManifest returns a manifest with update serial in manifest
func (*Catalog) BOSHManifestWithZeroInstances ¶
BOSHManifestWithZeroInstances for data gathering tests
func (*Catalog) BPMReleaseWithAffinity ¶
BPMReleaseWithAffinity returns a manifest with affinity
func (*Catalog) BPMReleaseWithTolerations ¶
BPMReleaseWithTolerations returns a manifest with tolerations
func (*Catalog) CustomOpsConfigMap ¶
CustomOpsConfigMap is an operations file with a custom structural change
func (*Catalog) CustomOpsSecret ¶
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 ¶
DefaultBOSHManifest returns a BOSH manifest for unit tests
func (*Catalog) DefaultConfig ¶
DefaultConfig for tests
func (*Catalog) DefaultPod ¶
DefaultPod defines a pod with a simple web server useful for testing
func (*Catalog) DefaultQuarksLinkSecret ¶
DefaultQuarksLinkSecret has default values from the nats release
func (*Catalog) DummyService ¶
DummyService for use in tests
func (*Catalog) EchoContainer ¶
EchoContainer returns a container which just "echo" for use in tests
func (*Catalog) ElaboratedBOSHManifest ¶
ElaboratedBOSHManifest for data gathering tests
func (*Catalog) EmptyBOSHDeployment ¶
func (c *Catalog) EmptyBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment
EmptyBOSHDeployment empty deployment CR
func (*Catalog) EntangledPod ¶
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) NatsConfigMap ¶
NatsConfigMap returns a ConfigMap used to test native-to-bosh quarks-links
func (*Catalog) NatsEndpoints ¶
NatsEndpoints is used to test native-to-bosh quarks-links
func (*Catalog) NatsOtherSecret ¶
NatsOtherSecret is used to test native-to-bosh quarks-links
func (*Catalog) NatsSecret ¶
NatsSecret is used to test native-to-bosh quarks-links
func (*Catalog) NatsService ¶
NatsService is used to test native-to-bosh quarks-links
func (*Catalog) NatsServiceExternalName ¶
NatsServiceExternalName is used to test native-to-bosh quarks-links
func (*Catalog) NatsServiceForEndpoint ¶
NatsServiceForEndpoint is used to test native-to-bosh quarks-links
func (*Catalog) NodePortService ¶
NodePortService returns a Service of type NodePort
func (*Catalog) PodWithTailLogsContainer ¶
func (c *Catalog) PodWithTailLogsContainer(podName string, parentPodCmd string, parentCName string, sidecardCName string, dockerImg string) corev1.Pod
PodWithTailLogsContainer will generate a pod with two containers One is the parent container that will execute a cmd, preferrable something that writes into files under /var/vcap/sys/log The side-car container, will be tailing the logs of specific files under /var/vcap/sys/log, by running the quarks-operator util tail-logs subcmommand
func (*Catalog) QuarksLinkSecret ¶
func (c *Catalog) QuarksLinkSecret(deploymentName, linkType, linkName string, value map[string][]byte) corev1.Secret
QuarksLinkSecret returns a link secret, as generated for consumption by an external (non BOSH) consumer
func (*Catalog) SecretBOSHDeployment ¶
func (c *Catalog) SecretBOSHDeployment(name, manifestRef string) bdv1.BOSHDeployment
SecretBOSHDeployment a deployment CR which expects the BOSH manifest in a secret. The name needs to match the name inside the referenced manifest.
func (*Catalog) Sleep1hPodSpec ¶
Sleep1hPodSpec defines a simple pod that sleeps 60*60s for testing
func (*Catalog) StorageClassSecret ¶
StorageClassSecret for tests
func (*Catalog) UserExplicitPassword ¶
UserExplicitPassword is a secret representing an explicit var, used as a password
func (*Catalog) VersionedSecret ¶
VersionedSecret for tests
func (*Catalog) WaitingPod ¶
WaitingPod is a pod which has the wait-for annotation 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 |
Package boshreleases contains test manifests for bpm related unit tests
|
Package boshreleases contains test manifests for bpm related unit tests |