v2

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the tests v1 API group +kubebuilder:object:generate=true +groupName=tests.testkube.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// Group represents the API Group
	Group = "tests.testkube.io"

	// Version represents the Resource version
	Version = "v2"

	// Resource corresponds to the CRD Kind
	Resource = "TestSuite"

	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// GroupVersionResource is group, version and resource used to register these objects
	GroupVersionResource = schema.GroupVersionResource{Group: Group, Version: Version, Resource: Resource}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type RunningContext added in v1.10.1

type RunningContext struct {
	// One of possible context types
	Type_ RunningContextType `json:"type"`
	// Context value depending from its type
	Context string `json:"context,omitempty"`
}

running context for test or test suite execution

type RunningContextType added in v1.10.1

type RunningContextType string
const (
	RunningContextTypeUserCLI     RunningContextType = "user-cli"
	RunningContextTypeUserUI      RunningContextType = "user-ui"
	RunningContextTypeTestSuite   RunningContextType = "testsuite"
	RunningContextTypeTestTrigger RunningContextType = "testtrigger"
	RunningContextTypeScheduler   RunningContextType = "scheduler"
	RunningContextTypeEmpty       RunningContextType = ""
)

type TestSuite

type TestSuite struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TestSuiteSpec   `json:"spec,omitempty"`
	Status TestSuiteStatus `json:"status,omitempty"`
}

TestSuite is the Schema for the testsuites API

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.

func (*TestSuite) Hub added in v1.13.0

func (*TestSuite) Hub()

Hub marks this type as a conversion hub.

func (*TestSuite) SetupWebhookWithManager

func (t *TestSuite) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up webhook with manager

type TestSuiteExecutionCore added in v1.8.4

type TestSuiteExecutionCore struct {
	// execution id
	Id string `json:"id,omitempty"`
	// test suite execution start time
	StartTime metav1.Time `json:"startTime,omitempty"`
	// test suite execution end time
	EndTime metav1.Time               `json:"endTime,omitempty"`
	Status  *TestSuiteExecutionStatus `json:"status,omitempty"`
}

test suite execution core

func (*TestSuiteExecutionCore) DeepCopy added in v1.8.4

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

func (*TestSuiteExecutionCore) DeepCopyInto added in v1.8.4

func (in *TestSuiteExecutionCore) DeepCopyInto(out *TestSuiteExecutionCore)

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

type TestSuiteExecutionRequest

type TestSuiteExecutionRequest struct {
	// test execution custom name
	Name string `json:"name,omitempty"`
	// test kubernetes namespace (\"testkube\" when not set)
	Namespace string              `json:"namespace,omitempty"`
	Variables map[string]Variable `json:"variables,omitempty"`
	// secret uuid
	SecretUUID string `json:"secretUUID,omitempty"`
	// test suite labels
	Labels map[string]string `json:"labels,omitempty"`
	// execution labels
	ExecutionLabels map[string]string `json:"executionLabels,omitempty"`
	// whether to start execution sync or async
	Sync bool `json:"sync,omitempty"`
	// http proxy for executor containers
	HttpProxy string `json:"httpProxy,omitempty"`
	// https proxy for executor containers
	HttpsProxy string `json:"httpsProxy,omitempty"`
	// timeout for test suite execution
	Timeout        int32           `json:"timeout,omitempty"`
	RunningContext *RunningContext `json:"runningContext,omitempty"`
	// cron job template extensions
	CronJobTemplate string `json:"cronJobTemplate,omitempty"`
}

test suite execution request body

func (*TestSuiteExecutionRequest) DeepCopy

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

func (*TestSuiteExecutionRequest) DeepCopyInto

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

type TestSuiteExecutionStatus added in v1.8.4

type TestSuiteExecutionStatus string

+kubebuilder:validation:Enum=queued;running;passed;failed;aborting;aborted;timeout

const (
	QUEUED_TestSuiteExecutionStatus   TestSuiteExecutionStatus = "queued"
	RUNNING_TestSuiteExecutionStatus  TestSuiteExecutionStatus = "running"
	PASSED_TestSuiteExecutionStatus   TestSuiteExecutionStatus = "passed"
	FAILED_TestSuiteExecutionStatus   TestSuiteExecutionStatus = "failed"
	ABORTING_TestSuiteExecutionStatus TestSuiteExecutionStatus = "aborting"
	ABORTED_TestSuiteExecutionStatus  TestSuiteExecutionStatus = "aborted"
	TIMEOUT_TestSuiteExecutionStatus  TestSuiteExecutionStatus = "timeout"
)

List of TestSuiteExecutionStatus

type TestSuiteList

type TestSuiteList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TestSuite `json:"items"`
}

TestSuiteList contains a list of TestSuite

func (*TestSuiteList) DeepCopy

func (in *TestSuiteList) DeepCopy() *TestSuiteList

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

func (*TestSuiteList) DeepCopyInto

func (in *TestSuiteList) DeepCopyInto(out *TestSuiteList)

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

func (*TestSuiteList) DeepCopyObject

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

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

type TestSuiteSpec

type TestSuiteSpec struct {

	// Before steps is list of tests which will be sequentially orchestrated
	Before []TestSuiteStepSpec `json:"before,omitempty"`
	// Steps is list of tests which will be sequentially orchestrated
	Steps []TestSuiteStepSpec `json:"steps,omitempty"`
	// After steps is list of tests which will be sequentially orchestrated
	After []TestSuiteStepSpec `json:"after,omitempty"`

	Repeats     int    `json:"repeats,omitempty"`
	Description string `json:"description,omitempty"`
	// schedule in cron job format for scheduled test execution
	Schedule         string                     `json:"schedule,omitempty"`
	ExecutionRequest *TestSuiteExecutionRequest `json:"executionRequest,omitempty"`
}

TestSuiteSpec defines the desired state of TestSuite

func (*TestSuiteSpec) DeepCopy

func (in *TestSuiteSpec) DeepCopy() *TestSuiteSpec

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

func (*TestSuiteSpec) DeepCopyInto

func (in *TestSuiteSpec) DeepCopyInto(out *TestSuiteSpec)

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

type TestSuiteStatus

type TestSuiteStatus struct {

	// latest execution result
	LatestExecution *TestSuiteExecutionCore `json:"latestExecution,omitempty"`
}

TestSuiteStatus defines the observed state of TestSuite

func (*TestSuiteStatus) DeepCopy

func (in *TestSuiteStatus) DeepCopy() *TestSuiteStatus

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

func (*TestSuiteStatus) DeepCopyInto

func (in *TestSuiteStatus) DeepCopyInto(out *TestSuiteStatus)

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

type TestSuiteStepDelay

type TestSuiteStepDelay struct {
	// Duration in ms
	Duration int32 `json:"duration,omitempty"`
}

TestSuiteStepDelay contains step delay parameters

func (*TestSuiteStepDelay) DeepCopy

func (in *TestSuiteStepDelay) DeepCopy() *TestSuiteStepDelay

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

func (*TestSuiteStepDelay) DeepCopyInto

func (in *TestSuiteStepDelay) DeepCopyInto(out *TestSuiteStepDelay)

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

type TestSuiteStepExecute

type TestSuiteStepExecute struct {
	Namespace     string `json:"namespace,omitempty"`
	Name          string `json:"name,omitempty"`
	StopOnFailure bool   `json:"stopOnFailure,omitempty"`
}

TestSuiteStepExecute defines step to be executed

func (*TestSuiteStepExecute) DeepCopy

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

func (*TestSuiteStepExecute) DeepCopyInto

func (in *TestSuiteStepExecute) DeepCopyInto(out *TestSuiteStepExecute)

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

type TestSuiteStepSpec

type TestSuiteStepSpec struct {
	Type    TestSuiteStepType     `json:"type,omitempty"`
	Execute *TestSuiteStepExecute `json:"execute,omitempty"`
	Delay   *TestSuiteStepDelay   `json:"delay,omitempty"`
}

TestSuiteStepSpec for particular type will have config for possible step types

func (*TestSuiteStepSpec) DeepCopy

func (in *TestSuiteStepSpec) DeepCopy() *TestSuiteStepSpec

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

func (*TestSuiteStepSpec) DeepCopyInto

func (in *TestSuiteStepSpec) DeepCopyInto(out *TestSuiteStepSpec)

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

type TestSuiteStepType

type TestSuiteStepType string

TestSuiteStepType defines different type of test suite steps +kubebuilder:validation:Enum=execute;delay

const (
	TestSuiteStepTypeExecute TestSuiteStepType = "execute"
	TestSuiteStepTypeDelay   TestSuiteStepType = "delay"
)

type Variable

type Variable commonv1.Variable

func (*Variable) DeepCopy

func (in *Variable) DeepCopy() *Variable

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

func (*Variable) DeepCopyInto

func (in *Variable) DeepCopyInto(out *Variable)

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

Jump to

Keyboard shortcuts

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