testing

package
v1.0.219 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 6 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

This section is empty.

Types

type Catalog

type Catalog struct{}

Catalog provides several instances for tests

func (*Catalog) AutoErrandQuarksJob

func (c *Catalog) AutoErrandQuarksJob(name string) qjv1a1.QuarksJob

AutoErrandQuarksJob default values

func (*Catalog) CmdJobTemplate

func (c *Catalog) CmdJobTemplate(cmd []string) batchv1b1.JobTemplateSpec

CmdJobTemplate returns the job spec with a given command for busybox

func (*Catalog) ConfigJobTemplate

func (c *Catalog) ConfigJobTemplate() batchv1b1.JobTemplateSpec

ConfigJobTemplate returns the spec with a given command for busybox

func (*Catalog) DefaultConfigMap

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

DefaultConfigMap for tests

func (*Catalog) DefaultOutputMap

func (c *Catalog) DefaultOutputMap() qjv1a1.OutputMap

DefaultOutputMap has default values to persist quarks job output to secrets

func (*Catalog) DefaultPod

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

DefaultPod defines a pod with a simple web server useful for testing

func (*Catalog) DefaultQuarksJob

func (c *Catalog) DefaultQuarksJob(name, namespace string) *qjv1a1.QuarksJob

DefaultQuarksJob default values

func (*Catalog) DefaultQuarksJobPod

func (c *Catalog) DefaultQuarksJobPod(name, namespace string) corev1.Pod

DefaultQuarksJobPod defines a pod with a simple web server and with a output-persist container

func (*Catalog) DefaultQuarksJobWithSucceededJob

func (c *Catalog) DefaultQuarksJobWithSucceededJob(name, namespace string) (*qjv1a1.QuarksJob, *batchv1.Job, *corev1.Pod)

DefaultQuarksJobWithSucceededJob returns an QuarksJob and a Job owned by it

func (*Catalog) DefaultSecret

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

DefaultSecret for tests

func (*Catalog) DefaultServiceAccount

func (c *Catalog) DefaultServiceAccount(name, namespace string) corev1.ServiceAccount

DefaultServiceAccount for tests

func (*Catalog) ErrandQuarksJob

func (c *Catalog) ErrandQuarksJob(name, namespace string) qjv1a1.QuarksJob

ErrandQuarksJob default values

func (*Catalog) FailingMultiContainerJobTemplate

func (c *Catalog) FailingMultiContainerJobTemplate(cmd []string) batchv1b1.JobTemplateSpec

FailingMultiContainerJobTemplate returns a spec with a given command for busybox and a second container which fails

func (*Catalog) OutputQuarksJob

func (c *Catalog) OutputQuarksJob(name string) qjv1a1.QuarksJob

OutputQuarksJob default values

func (*Catalog) QuarksJobPodTemplate

func (c *Catalog) QuarksJobPodTemplate(cmd []string) batchv1b1.JobTemplateSpec

QuarksJobPodTemplate returns the spec with a given output-persist container

func (*Catalog) Sleep1hPodSpec

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

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

func (*Catalog) Sleep1hQuarksJobPodSpec

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

Sleep1hQuarksJobPodSpec defines a simple pod that sleeps 60*60s for testing with a output-persist container

Jump to

Keyboard shortcuts

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