Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the testing v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kyma-incubator/octopus/pkg/apis/testing +k8s:defaulter-gen=TypeMeta +groupName=testing.kyma-project.io
Package v1alpha1 contains API Schema definitions for the testing v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kyma-incubator/octopus/pkg/apis/testing +k8s:defaulter-gen=TypeMeta +groupName=testing.kyma-project.io
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ClusterTestSuite
- type ClusterTestSuiteList
- type Status
- type TestDefReference
- type TestDefinition
- type TestDefinitionList
- type TestDefinitionSpec
- type TestExecution
- type TestResult
- type TestStatus
- type TestSuiteCondition
- type TestSuiteConditionType
- type TestSuiteSpec
- type TestSuiteStatus
- type TestsSelector
Constants ¶
const ( LabelKeyCreatedByOctopus = "testing.kyma-project.io/created-by-octopus" LabelKeySuiteName = "testing.kyma-project.io/suite-name" LabelKeyTestDefName = "testing.kyma-project.io/def-name" )
const ( StatusTrue Status = "True" StatusFalse Status = "False" StatusUnknown Status = "Unknown" // SuiteUninitialized is when suite has not yet determined tests to run // TODO(aszecowka) set it as a default values/initialized value (https://github.com/kyma-incubator/octopus/issues/11) SuiteUninitialized TestSuiteConditionType = "Uninitialized" // When tests are running SuiteRunning TestSuiteConditionType = "Running" // When suite is finished and there were configuration problems, like missing test image SuiteError TestSuiteConditionType = "Error" // When suite is finished and there were failing tests SuiteFailed TestSuiteConditionType = "Failed" // When all tests passed SuiteSucceeded TestSuiteConditionType = "Succeeded" // TestStatus represents status of a given test (test-kubeless) , not a test execution, because we can have many // executions of the same tests (in case of MaxRetries>0 or Count>1) // // Test is not yet scheduled TestNotYetScheduled TestStatus = "NotYetScheduled" // Test is running TestScheduled TestStatus = "Scheduled" // TODO(aszecowka)(later) do we need both of them? TestRunning TestStatus = "Running" TestUnknown TestStatus = "Unknown" TestFailed TestStatus = "Failed" TestSucceeded TestStatus = "Succeeded" TestSkipped TestStatus = "Skipped" ReasonErrorOnInitialization = "initializationFailure" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "testing.kyma-project.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type ClusterTestSuite ¶
type ClusterTestSuite struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TestSuiteSpec `json:"spec,omitempty"` Status TestSuiteStatus `json:"status,omitempty"` }
ClusterTestSuite is the Schema for the testsuites API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=clustertestsuites,shortName=cts
func (*ClusterTestSuite) DeepCopy ¶
func (in *ClusterTestSuite) DeepCopy() *ClusterTestSuite
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTestSuite.
func (*ClusterTestSuite) DeepCopyInto ¶
func (in *ClusterTestSuite) DeepCopyInto(out *ClusterTestSuite)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterTestSuite) DeepCopyObject ¶
func (in *ClusterTestSuite) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ClusterTestSuite) HasSelector ¶
func (in ClusterTestSuite) HasSelector() bool
type ClusterTestSuiteList ¶
type ClusterTestSuiteList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterTestSuite `json:"items"` }
ClusterTestSuiteList contains a list of ClusterTestSuite
func (*ClusterTestSuiteList) DeepCopy ¶
func (in *ClusterTestSuiteList) DeepCopy() *ClusterTestSuiteList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTestSuiteList.
func (*ClusterTestSuiteList) DeepCopyInto ¶
func (in *ClusterTestSuiteList) DeepCopyInto(out *ClusterTestSuiteList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterTestSuiteList) DeepCopyObject ¶
func (in *ClusterTestSuiteList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestDefReference ¶
func (*TestDefReference) DeepCopy ¶
func (in *TestDefReference) DeepCopy() *TestDefReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestDefReference.
func (*TestDefReference) DeepCopyInto ¶
func (in *TestDefReference) DeepCopyInto(out *TestDefReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestDefinition ¶
type TestDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TestDefinitionSpec `json:"spec,omitempty"` }
TestDefinition is the Schema for the testdefinitions API +k8s:openapi-gen=true +kubebuilder:resource:path=testdefinitions,shortName=td
func (*TestDefinition) DeepCopy ¶
func (in *TestDefinition) DeepCopy() *TestDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestDefinition.
func (*TestDefinition) DeepCopyInto ¶
func (in *TestDefinition) DeepCopyInto(out *TestDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestDefinition) DeepCopyObject ¶
func (in *TestDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestDefinitionList ¶
type TestDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TestDefinition `json:"items"` }
TestDefinitionList contains a list of TestDefinition
func (*TestDefinitionList) DeepCopy ¶
func (in *TestDefinitionList) DeepCopy() *TestDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestDefinitionList.
func (*TestDefinitionList) DeepCopyInto ¶
func (in *TestDefinitionList) DeepCopyInto(out *TestDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestDefinitionList) DeepCopyObject ¶
func (in *TestDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestDefinitionSpec ¶
type TestDefinitionSpec struct { Template v1.PodTemplateSpec `json:"template"` // If there are some problems with given test, we add possibility to don't execute them. // On Testsuite level such test should be marked as a skipped. // Default value is false Skip bool `json:"skip,omitempty"` // If test is working on data that can be modified by another test, // I would like to run it in separation. // Default value is false DisableConcurrency bool `json:"disableConcurrency,omitempty"` // Test should be interrupted after the timeout. // On test suite level such test should be marked as a timeouted. // No default value. Timeout *metav1.Duration `json:"timeout,inline,omitempty"` }
TestDefinitionSpec defines the desired state of TestDefinition
func (*TestDefinitionSpec) DeepCopy ¶
func (in *TestDefinitionSpec) DeepCopy() *TestDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestDefinitionSpec.
func (*TestDefinitionSpec) DeepCopyInto ¶
func (in *TestDefinitionSpec) DeepCopyInto(out *TestDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestExecution ¶
type TestExecution struct { // ID is equivalent to a testing Pod name ID string `json:"id"` PodPhase v1.PodPhase `json:"podPhase"` StartTime *metav1.Time `json:"startTime,inline,omitempty"` CompletionTime *metav1.Time `json:"completionTime,inline,omitempty"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` }
TestExecution provides status for given test execution
func (*TestExecution) DeepCopy ¶
func (in *TestExecution) DeepCopy() *TestExecution
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestExecution.
func (*TestExecution) DeepCopyInto ¶
func (in *TestExecution) DeepCopyInto(out *TestExecution)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestResult ¶
type TestResult struct { // Test name Name string `json:"name"` Namespace string `json:"namespace"` Status TestStatus `json:"status"` Executions []TestExecution `json:"executions"` DisabledConcurrency bool `json:"disabledConcurrency,omitempty"` }
TestResult gathers all executions for given TestDefinition
func (*TestResult) DeepCopy ¶
func (in *TestResult) DeepCopy() *TestResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestResult.
func (*TestResult) DeepCopyInto ¶
func (in *TestResult) DeepCopyInto(out *TestResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestStatus ¶
type TestStatus string
type TestSuiteCondition ¶
type TestSuiteCondition struct { Type TestSuiteConditionType `json:"type"` Status Status `json:"status"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` }
func (*TestSuiteCondition) DeepCopy ¶
func (in *TestSuiteCondition) DeepCopy() *TestSuiteCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSuiteCondition.
func (*TestSuiteCondition) DeepCopyInto ¶
func (in *TestSuiteCondition) DeepCopyInto(out *TestSuiteCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestSuiteConditionType ¶
type TestSuiteConditionType string
type TestSuiteSpec ¶
type TestSuiteSpec struct { // How many tests we want to execute at the same time. // Depends on cluster size and it's load. // Default value is 1 Concurrency int64 `json:"concurrency,omitempty"` // Decide which tests to execute. If not provided execute all tests Selectors TestsSelector `json:"selectors,omitempty"` // Running all tests from suite cannot take more time that specified here. // Default value is 1h SuiteTimeout *metav1.Duration `json:"suiteTimeout,inline,omitempty"` // How many times should I run every test? Default value is 1. Count int64 `json:"count,omitempty"` // In case of a failed test, how many times it will be retried. // If test failed and on retry it succeeded, Test Suite should be marked as a succeeded. // Default value is 0 - no retries. // MaxRetries and Count cannot be used mutually. MaxRetries int64 `json:"maxRetries,omitempty"` }
TestSuiteSpec defines the desired state of ClusterTestSuite
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 { StartTime *metav1.Time `json:"startTime,inline,omitempty"` CompletionTime *metav1.Time `json:"completionTime,inline,omitempty"` Conditions []TestSuiteCondition `json:"conditions,omitempty"` Results []TestResult `json:"results,omitempty"` }
TestSuiteStatus defines the observed state of ClusterTestSuite
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 TestsSelector ¶
type TestsSelector struct { // Find test definitions by it's name MatchNames []TestDefReference `json:"matchNames,omitempty"` // Find test definitions by their labels. // TestDefinition must match AT LEAST one expression listed here to be executed. // For the complete grammar see: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels MatchLabelExpressions []string `json:"matchLabelExpressions,omitempty"` }
func (*TestsSelector) DeepCopy ¶
func (in *TestsSelector) DeepCopy() *TestsSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestsSelector.
func (*TestsSelector) DeepCopyInto ¶
func (in *TestsSelector) DeepCopyInto(out *TestsSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.