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 ¶
- type Catalog
- func (c *Catalog) AutoErrandQuarksJob(name string) qjv1a1.QuarksJob
- func (c *Catalog) CmdJobTemplate(cmd []string) batchv1b1.JobTemplateSpec
- func (c *Catalog) ConfigJobTemplate() batchv1b1.JobTemplateSpec
- func (c *Catalog) DefaultConfigMap(name, namespace string) corev1.ConfigMap
- func (c *Catalog) DefaultOutputMap() qjv1a1.OutputMap
- func (c *Catalog) DefaultPod(name, namespace string) corev1.Pod
- func (c *Catalog) DefaultQuarksJob(name, namespace string) *qjv1a1.QuarksJob
- func (c *Catalog) DefaultQuarksJobPod(name, namespace string) corev1.Pod
- func (c *Catalog) DefaultQuarksJobWithSucceededJob(name, namespace string) (*qjv1a1.QuarksJob, *batchv1.Job, *corev1.Pod)
- func (c *Catalog) DefaultSecret(name, namespace string) corev1.Secret
- func (c *Catalog) DefaultServiceAccount(name, namespace string) corev1.ServiceAccount
- func (c *Catalog) ErrandQuarksJob(name, namespace string) qjv1a1.QuarksJob
- func (c *Catalog) FailingMultiContainerJobTemplate(cmd []string) batchv1b1.JobTemplateSpec
- func (c *Catalog) OutputQuarksJob(name string) qjv1a1.QuarksJob
- func (c *Catalog) QuarksJobPodTemplate(cmd []string) batchv1b1.JobTemplateSpec
- func (c *Catalog) Sleep1hPodSpec() corev1.PodSpec
- func (c *Catalog) Sleep1hQuarksJobPodSpec() corev1.PodSpec
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 ¶
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 ¶
DefaultConfigMap for tests
func (*Catalog) DefaultOutputMap ¶
DefaultOutputMap has default values to persist quarks job output to secrets
func (*Catalog) DefaultPod ¶
DefaultPod defines a pod with a simple web server useful for testing
func (*Catalog) DefaultQuarksJob ¶
DefaultQuarksJob default values
func (*Catalog) DefaultQuarksJobPod ¶
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 ¶
DefaultSecret for tests
func (*Catalog) DefaultServiceAccount ¶
func (c *Catalog) DefaultServiceAccount(name, namespace string) corev1.ServiceAccount
DefaultServiceAccount for tests
func (*Catalog) ErrandQuarksJob ¶
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 ¶
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 ¶
Sleep1hPodSpec defines a simple pod that sleeps 60*60s for testing
func (*Catalog) Sleep1hQuarksJobPodSpec ¶
Sleep1hQuarksJobPodSpec defines a simple pod that sleeps 60*60s for testing with a output-persist container