v1beta1

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Overview

Package v1beta1 contains API Schema definitions for the testharness API group +k8s:openapi-gen=false +k8s:deepcopy-gen=package +groupName=kudo.dev +kubebuilder:skip

Index

Constants

View Source
const DefaultKINDContext = "kind"

DefaultKINDContext defines the default kind context to use.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// The command and argument to run as a string.
	Command string `json:"command"`
	// If set, the `--namespace` flag will be appended to the command with the namespace to use.
	Namespaced bool `json:"namespaced"`
	// If set, exit failures (`exec.ExitError`) will be ignored. `exec.Error` are NOT ignored.
	IgnoreFailure bool `json:"ignoreFailure"`
	// If set, the command is run in the background.
	Background bool `json:"background"`
}

Command describes a command to run as a part of a test step or suite.

func (*Command) DeepCopy

func (in *Command) DeepCopy() *Command

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Command.

func (*Command) DeepCopyInto

func (in *Command) DeepCopyInto(out *Command)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObjectReference

type ObjectReference struct {
	corev1.ObjectReference `json:",inline"`
	// Labels to match on.
	Labels map[string]string `json:"labels"`
}

ObjectReference is a Kubernetes object reference with added labels to allow referencing objects by label.

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TestAssert

type TestAssert struct {
	// The type meta object, should always be a GVK of kudo.dev/v1beta1/TestAssert.
	metav1.TypeMeta `json:",inline"`
	// Override the default timeout of 30 seconds (in seconds).
	Timeout int `json:"timeout"`
}

TestAssert represents the settings needed to verify the result of a test step.

func (*TestAssert) DeepCopy

func (in *TestAssert) DeepCopy() *TestAssert

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestAssert.

func (*TestAssert) DeepCopyInto

func (in *TestAssert) DeepCopyInto(out *TestAssert)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestAssert) DeepCopyObject

func (in *TestAssert) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TestStep

type TestStep struct {
	// The type meta object, should always be a GVK of kudo.dev/v1beta1/TestStep.
	metav1.TypeMeta `json:",inline"`
	// Override the default metadata. Set labels or override the test step name.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +kubebuilder:validation:Format:=int64
	Index int `json:"index,omitempty"`
	// Objects to delete at the beginning of the test step.
	Delete []ObjectReference `json:"delete,omitempty"`

	// Indicates that this is a unit test - safe to run without a real Kubernetes cluster.
	UnitTest bool `json:"unitTest"`

	// Commands to run prior at the beginning of the test step.
	Commands []Command `json:"commands"`
}

TestStep settings to apply to a test step.

func (*TestStep) DeepCopy

func (in *TestStep) DeepCopy() *TestStep

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStep.

func (*TestStep) DeepCopyInto

func (in *TestStep) DeepCopyInto(out *TestStep)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestStep) DeepCopyObject

func (in *TestStep) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TestSuite

type TestSuite struct {
	// The type meta object, should always be a GVK of kudo.dev/v1beta1/TestSuite.
	metav1.TypeMeta `json:",inline"`
	// Set labels or the test suite name.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Path to CRDs to install before running tests.
	CRDDir string `json:"crdDir"`
	// Paths to directories containing manifests to install before running tests.
	ManifestDirs []string `json:"manifestDirs"`
	// Directories containing test cases to run.
	TestDirs []string `json:"testDirs"`
	// Whether or not to start a local etcd and kubernetes API server for the tests.
	StartControlPlane bool `json:"startControlPlane"`
	// ControlPlaneArgs defaults to APIServerDefaultArgs from controller-runtime pkg/internal/testing/integration/internal/apiserver.go
	// this allows for control over the args, however these are not serialized from a TestSuite.yaml
	ControlPlaneArgs []string
	// Whether or not to start a local kind cluster for the tests.
	StartKIND bool `json:"startKIND"`
	// Path to the KIND configuration file to use.
	KINDConfig string `json:"kindConfig"`
	// KIND context to use.
	KINDContext string `json:"kindContext"`
	// If set, each node defined in the kind configuration will have a docker named volume mounted into it to persist
	// pulled container images across test runs.
	KINDNodeCache bool `json:"kindNodeCache"`
	// Containers to load to each KIND node prior to running the tests.
	KINDContainers []string `json:"kindContainers"`
	// If set, do not delete the resources after running the tests (implies SkipClusterDelete).
	SkipDelete bool `json:"skipDelete"`
	// If set, do not delete the mocked control plane or kind cluster.
	SkipClusterDelete bool `json:"skipClusterDelete"`
	// Override the default timeout of 30 seconds (in seconds).
	// +kubebuilder:validation:Format:=int64
	Timeout int `json:"timeout"`
	// The maximum number of tests to run at once (default: 8).
	// +kubebuilder:validation:Format:=int64
	Parallel int `json:"parallel"`
	// The directory to output artifacts to (current working directory if not specified).
	ArtifactsDir string `json:"artifactsDir"`
	// Commands to run prior to running the tests.
	Commands []Command `json:"commands"`
}

TestSuite configures which tests should be loaded.

func (*TestSuite) DeepCopy

func (in *TestSuite) DeepCopy() *TestSuite

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuite.

func (*TestSuite) DeepCopyInto

func (in *TestSuite) DeepCopyInto(out *TestSuite)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestSuite) DeepCopyObject

func (in *TestSuite) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

Jump to

Keyboard shortcuts

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