Documentation ¶
Overview ¶
Package v3 contains API Schema definitions for the tests v3 API group +kubebuilder:object:generate=true +groupName=tests.testkube.io
Index ¶
- Variables
- type ArtifactRequest
- type EnvReference
- type ExecutionCore
- type ExecutionRequest
- type ExecutionStatus
- type GitAuthType
- type Repository
- type RunningContext
- type RunningContextType
- type SecretRef
- type Test
- type TestContent
- type TestContentType
- type TestList
- type TestSpec
- type TestStatus
- type Variable
Constants ¶
This section is empty.
Variables ¶
var ( // Group represents the API Group Group = "tests.testkube.io" // Version represents the Resource version Version = "v3" // Resource corresponds to the CRD Kind Resource = "Test" // 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 ArtifactRequest ¶ added in v1.7.0
type ArtifactRequest struct { // artifact storage class name StorageClassName string `json:"storageClassName"` // artifact volume mount path VolumeMountPath string `json:"volumeMountPath"` // artifact directories Dirs []string `json:"dirs,omitempty"` }
artifact request body for container executors with test artifacts
func (*ArtifactRequest) DeepCopy ¶ added in v1.7.0
func (in *ArtifactRequest) DeepCopy() *ArtifactRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactRequest.
func (*ArtifactRequest) DeepCopyInto ¶ added in v1.7.0
func (in *ArtifactRequest) DeepCopyInto(out *ArtifactRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvReference ¶ added in v1.9.2
type EnvReference struct { v1.LocalObjectReference `json:"reference"` // whether we shoud mount resource Mount bool `json:"mount,omitempty"` // where we shoud mount resource MountPath string `json:"mountPath,omitempty"` // whether we shoud map to variables from resource MapToVariables bool `json:"mapToVariables,omitempty"` }
Reference to env resource
func (*EnvReference) DeepCopy ¶ added in v1.9.2
func (in *EnvReference) DeepCopy() *EnvReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvReference.
func (*EnvReference) DeepCopyInto ¶ added in v1.9.2
func (in *EnvReference) DeepCopyInto(out *EnvReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionCore ¶ added in v1.8.4
type ExecutionCore struct { // execution id Id string `json:"id,omitempty"` // execution number Number int32 `json:"number,omitempty"` // test start time StartTime metav1.Time `json:"startTime,omitempty"` // test end time EndTime metav1.Time `json:"endTime,omitempty"` Status *ExecutionStatus `json:"status,omitempty"` }
test execution core
func (*ExecutionCore) DeepCopy ¶ added in v1.8.4
func (in *ExecutionCore) DeepCopy() *ExecutionCore
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionCore.
func (*ExecutionCore) DeepCopyInto ¶ added in v1.8.4
func (in *ExecutionCore) DeepCopyInto(out *ExecutionCore)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionRequest ¶
type ExecutionRequest struct { // test execution custom name Name string `json:"name,omitempty"` // unique test suite name (CRD Test suite name), if it's run as a part of test suite TestSuiteName string `json:"testSuiteName,omitempty"` // test execution number Number int32 `json:"number,omitempty"` // test execution labels ExecutionLabels map[string]string `json:"executionLabels,omitempty"` // test kubernetes namespace (\"testkube\" when not set) Namespace string `json:"namespace,omitempty"` // variables file content - need to be in format for particular executor (e.g. postman envs file) VariablesFile string `json:"variablesFile,omitempty"` IsVariablesFileArchived bool `json:"isVariablesFileArchived,omitempty"` Variables map[string]Variable `json:"variables,omitempty"` // test secret uuid TestSecretUUID string `json:"testSecretUUID,omitempty"` // test suite secret uuid, if it's run as a part of test suite TestSuiteSecretUUID string `json:"testSuiteSecretUUID,omitempty"` // additional executor binary arguments Args []string `json:"args,omitempty"` // container executor binary command Command []string `json:"command,omitempty"` // container executor image Image string `json:"image,omitempty"` // container executor image pull secrets ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Environment variables passed to executor. // Deprecated: use Basic Variables instead Envs map[string]string `json:"envs,omitempty"` // Execution variables passed to executor from secrets. // Deprecated: use Secret Variables instead SecretEnvs map[string]string `json:"secretEnvs,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"` // negative test will fail the execution if it is a success and it will succeed if it is a failure NegativeTest bool `json:"negativeTest,omitempty"` // Optional duration in seconds the pod may be active on the node relative to // StartTime before the system will actively try to mark it failed and kill associated containers. // Value must be a positive integer. ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty"` ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"` // job template extensions JobTemplate string `json:"jobTemplate,omitempty"` // script to run before test execution PreRunScript string `json:"preRunScript,omitempty"` // scraper template extensions ScraperTemplate string `json:"scraperTemplate,omitempty"` // config map references EnvConfigMaps []EnvReference `json:"envConfigMaps,omitempty"` // secret references EnvSecrets []EnvReference `json:"envSecrets,omitempty"` RunningContext *RunningContext `json:"runningContext,omitempty"` }
test execution request body
func (*ExecutionRequest) DeepCopy ¶
func (in *ExecutionRequest) DeepCopy() *ExecutionRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutionRequest.
func (*ExecutionRequest) DeepCopyInto ¶
func (in *ExecutionRequest) DeepCopyInto(out *ExecutionRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecutionStatus ¶ added in v1.8.4
type ExecutionStatus string
+kubebuilder:validation:Enum=queued;running;passed;failed;aborted;timeout
const ( QUEUED_ExecutionStatus ExecutionStatus = "queued" RUNNING_ExecutionStatus ExecutionStatus = "running" PASSED_ExecutionStatus ExecutionStatus = "passed" FAILED_ExecutionStatus ExecutionStatus = "failed" ABORTED_ExecutionStatus ExecutionStatus = "aborted" TIMEOUT_ExecutionStatus ExecutionStatus = "timeout" )
List of ExecutionStatus
type GitAuthType ¶ added in v1.10.6
type GitAuthType string
GitAuthType defines git auth type +kubebuilder:validation:Enum=basic;header
const ( // GitAuthTypeBasic for git basic auth requests GitAuthTypeBasic GitAuthType = "basic" // GitAuthTypeHeader for git header auth requests GitAuthTypeHeader GitAuthType = "header" )
type Repository ¶
type Repository struct { // VCS repository type Type_ string `json:"type,omitempty"` // uri of content file or git directory Uri string `json:"uri,omitempty"` // branch/tag name for checkout Branch string `json:"branch,omitempty"` // commit id (sha) for checkout Commit string `json:"commit,omitempty"` // if needed we can checkout particular path (dir or file) in case of BIG/mono repositories Path string `json:"path,omitempty"` UsernameSecret *SecretRef `json:"usernameSecret,omitempty"` TokenSecret *SecretRef `json:"tokenSecret,omitempty"` // git auth certificate secret for private repositories CertificateSecret string `json:"certificateSecret,omitempty"` // if provided we checkout the whole repository and run test from this directory WorkingDir string `json:"workingDir,omitempty"` // auth type for git requests AuthType GitAuthType `json:"authType,omitempty"` }
Repository represents VCS repo, currently we're handling Git only
func (*Repository) DeepCopy ¶
func (in *Repository) DeepCopy() *Repository
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository.
func (*Repository) DeepCopyInto ¶
func (in *Repository) DeepCopyInto(out *Repository)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 SecretRef ¶ added in v1.4.5
type SecretRef struct { // object kubernetes namespace Namespace string `json:"namespace,omitempty"` // object name Name string `json:"name"` // object key Key string `json:"key"` }
Testkube internal reference for secret storage in Kubernetes secrets
func (*SecretRef) DeepCopy ¶ added in v1.4.5
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (*SecretRef) DeepCopyInto ¶ added in v1.4.5
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Test ¶
type Test struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TestSpec `json:"spec,omitempty"` Status TestStatus `json:"status,omitempty"` }
Test is the Schema for the tests API +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type` +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*Test) ConvertFrom ¶
func (dst *Test) ConvertFrom(srcRaw conversion.Hub) error
ConvertFrom converts Script from the Hub version (v1) to this version.
func (*Test) ConvertTo ¶
func (src *Test) ConvertTo(dstRaw conversion.Hub) error
ConvertTo converts this Script to the Hub version (v1).
func (*Test) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Test.
func (*Test) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Test) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestContent ¶
type TestContent struct { // test type Type_ TestContentType `json:"type,omitempty"` // repository of test content Repository *Repository `json:"repository,omitempty"` // test content body Data string `json:"data,omitempty"` // uri of test content Uri string `json:"uri,omitempty"` }
TestContent defines test content
func (*TestContent) DeepCopy ¶
func (in *TestContent) DeepCopy() *TestContent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestContent.
func (*TestContent) DeepCopyInto ¶
func (in *TestContent) DeepCopyInto(out *TestContent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestContentType ¶ added in v1.10.6
type TestContentType string
+kubebuilder:validation:Enum=string;file-uri;git-file;git-dir;git
const ( TestContentTypeString TestContentType = "string" TestContentTypeFileURI TestContentType = "file-uri" // Deprecated: use git instead TestContentTypeGitFile TestContentType = "git-file" // Deprecated: use git instead TestContentTypeGitDir TestContentType = "git-dir" TestContentTypeGit TestContentType = "git" )
type TestList ¶
type TestList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Test `json:"items"` }
TestList contains a list of Test
func (*TestList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestList.
func (*TestList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestSpec ¶
type TestSpec struct { // test type Type_ string `json:"type,omitempty"` // test name Name string `json:"name,omitempty"` // test content object Content *TestContent `json:"content,omitempty"` // reference to test source resource Source string `json:"source,omitempty"` // schedule in cron job format for scheduled test execution Schedule string `json:"schedule,omitempty"` ExecutionRequest *ExecutionRequest `json:"executionRequest,omitempty"` // files to be used from minio uploads Uploads []string `json:"uploads,omitempty"` }
TestSpec defines the desired state of Test
func (*TestSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestSpec.
func (*TestSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestStatus ¶
type TestStatus struct { // latest execution result LatestExecution *ExecutionCore `json:"latestExecution,omitempty"` }
TestStatus defines the observed state of Test
func (*TestStatus) DeepCopy ¶
func (in *TestStatus) DeepCopy() *TestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestStatus.
func (*TestStatus) DeepCopyInto ¶
func (in *TestStatus) DeepCopyInto(out *TestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.