Documentation ¶
Overview ¶
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.1 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- Variables
- type Artifact
- type Artifacts
- type AssertionResult
- type Execution
- func (e *Execution) Duration() time.Duration
- func (e Execution) Err(err error) Execution
- func (e Execution) Errw(msg string, err error) Execution
- func (e Execution) IsFailed() bool
- func (e *Execution) Start()
- func (e *Execution) Stop()
- func (e *Execution) WithContent(content string) *Execution
- func (e *Execution) WithParams(params map[string]string) *Execution
- func (e *Execution) WithRepository(repository *Repository) *Execution
- func (e *Execution) WithRepositoryData(uri, branch, path string) *Execution
- type ExecutionRequest
- type ExecutionResult
- func (r *ExecutionResult) Err(err error) ExecutionResult
- func (e *ExecutionResult) Error()
- func (e *ExecutionResult) IsCompleted() bool
- func (e *ExecutionResult) IsFailed() bool
- func (e *ExecutionResult) IsPending() bool
- func (e *ExecutionResult) IsQueued() bool
- func (e *ExecutionResult) IsSuccesful() bool
- func (e *ExecutionResult) Success()
- type ExecutionResultStep
- type ExecutionResultStepAssertion
- type ExecutionStatus
- type ExecutionStepResult
- type ExecutionSummary
- type Executions
- type ExecutionsResult
- type ExecutionsTotals
- type Executor
- type ExecutorCreateRequest
- type ExecutorDetails
- type ExecutorOutput
- type ExecutorStartRequest
- type ExecutorsDetails
- type KeyValue
- type ObjectRef
- type Problem
- type Repository
- type Script
- type ScriptUpsertRequest
- type Scripts
- type ServerInfo
- type Status
- type Test
- type TestBase
- type TestCreateRequest
- type TestExecution
- type TestExecutionRequest
- type TestExecutionSummary
- type TestExecutionsResult
- type TestStatus
- type TestStep
- type TestStepBase
- type TestStepDelay
- type TestStepExecuteScript
- type TestStepExecutionResult
- type TestStepExecutionSummary
- type TestStepType
- type TestUpsertRequest
- type Tests
Constants ¶
This section is empty.
Variables ¶
var ExecutionStatusError = StatusPtr(ERROR__ExecutionStatus)
var ExecutionStatusPending = StatusPtr(PENDING_ExecutionStatus)
var ExecutionStatusQueued = StatusPtr(QUEUED_ExecutionStatus)
var ExecutionStatusSuccess = StatusPtr(SUCCESS_ExecutionStatus)
var TestStatusError = TestStatusPtr(ERROR__TestStatus)
var TestStatusPending = TestStatusPtr(PENDING_TestStatus)
var TestStatusQueued = TestStatusPtr(QUEUED_TestStatus)
var TestStatusSuccess = TestStatusPtr(SUCCESS_TestStatus)
Functions ¶
This section is empty.
Types ¶
type Artifact ¶ added in v0.6.4
type Artifact struct { // artifact file path Name string `json:"name,omitempty"` // file size in bytes Size int32 `json:"size,omitempty"` }
API server artifact
type AssertionResult ¶
type AssertionResult struct { Name string `json:"name,omitempty"` Status string `json:"status,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` }
execution result data
type Execution ¶
type Execution struct { // execution id Id string `json:"id,omitempty"` // unique script name (CRD Script name) ScriptName string `json:"scriptName,omitempty"` // script type e.g. postman/collection ScriptType string `json:"scriptType,omitempty"` // execution name Name string `json:"name,omitempty"` // environment variables passed to executor Envs map[string]string `json:"envs,omitempty"` // additional arguments/flags passed to executor binary Args []string `json:"args,omitempty"` // execution params passed to executor converted to vars for usage in tests Params map[string]string `json:"params,omitempty"` // script metadata content ScriptContent string `json:"scriptContent,omitempty"` Repository *Repository `json:"repository,omitempty"` // test start time StartTime time.Time `json:"startTime,omitempty"` // test end time EndTime time.Time `json:"endTime,omitempty"` ExecutionResult *ExecutionResult `json:"executionResult,omitempty"` // execution tags Tags []string `json:"tags,omitempty"` }
API server script execution
func ExecutorStartRequestToExecution ¶
func ExecutorStartRequestToExecution(request ExecutorStartRequest) Execution
scripts execution request body
func NewExecution ¶
func NewExecutionWithID ¶
func NewFailedExecution ¶ added in v0.7.6
func (*Execution) WithContent ¶
func (*Execution) WithRepository ¶
func (e *Execution) WithRepository(repository *Repository) *Execution
func (*Execution) WithRepositoryData ¶
type ExecutionRequest ¶
type ExecutionRequest struct { // script execution custom name Name string `json:"name,omitempty"` // script kubernetes namespace (\"testkube\" when not set) Namespace string `json:"namespace,omitempty"` // execution params passed to executor Params map[string]string `json:"params,omitempty"` Tags []string `json:"tags,omitempty"` }
scripts execution request body
type ExecutionResult ¶
type ExecutionResult struct { Status *ExecutionStatus `json:"status"` // RAW Script execution output, depends of reporter used in particular tool Output string `json:"output,omitempty"` // output type depends of reporter used in partucular tool OutputType string `json:"outputType,omitempty"` // error message when status is error, separate to output as output can be partial in case of error ErrorMessage string `json:"errorMessage,omitempty"` // execution steps (for collection of requests) Steps []ExecutionStepResult `json:"steps,omitempty"` }
execution result returned from executor
func NewErrorExecutionResult ¶ added in v0.7.6
func NewErrorExecutionResult(err error) ExecutionResult
func NewPendingExecutionResult ¶ added in v0.6.4
func NewPendingExecutionResult() ExecutionResult
func NewQueuedExecutionResult ¶ added in v0.6.4
func NewQueuedExecutionResult() ExecutionResult
func (*ExecutionResult) Err ¶
func (r *ExecutionResult) Err(err error) ExecutionResult
func (*ExecutionResult) Error ¶
func (e *ExecutionResult) Error()
func (*ExecutionResult) IsCompleted ¶
func (e *ExecutionResult) IsCompleted() bool
func (*ExecutionResult) IsFailed ¶
func (e *ExecutionResult) IsFailed() bool
func (*ExecutionResult) IsPending ¶
func (e *ExecutionResult) IsPending() bool
func (*ExecutionResult) IsQueued ¶
func (e *ExecutionResult) IsQueued() bool
func (*ExecutionResult) IsSuccesful ¶
func (e *ExecutionResult) IsSuccesful() bool
func (*ExecutionResult) Success ¶
func (e *ExecutionResult) Success()
type ExecutionResultStep ¶
type ExecutionResultStep struct { // step name Name string `json:"name,omitempty"` // script execution start time StartTime time.Time `json:"startTime,omitempty"` // script execution start time EndTime time.Time `json:"endTime,omitempty"` // execution step status Status string `json:"status,omitempty"` Assertions *ExecutionResultStepAssertion `json:"assertions,omitempty"` }
execution result data
type ExecutionResultStepAssertion ¶
type ExecutionResultStepAssertion struct { Name string `json:"name,omitempty"` Status string `json:"status,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` }
execution result data
type ExecutionStatus ¶
type ExecutionStatus string
const ( QUEUED_ExecutionStatus ExecutionStatus = "queued" PENDING_ExecutionStatus ExecutionStatus = "pending" SUCCESS_ExecutionStatus ExecutionStatus = "success" ERROR__ExecutionStatus ExecutionStatus = "error" )
List of ExecutionStatus
func StatusPtr ¶
func StatusPtr(status ExecutionStatus) *ExecutionStatus
type ExecutionStepResult ¶
type ExecutionStepResult struct { // step name Name string `json:"name"` Duration string `json:"duration,omitempty"` // execution step status Status string `json:"status"` AssertionResults []AssertionResult `json:"assertionResults,omitempty"` }
execution result data
type ExecutionSummary ¶
type ExecutionSummary struct { // execution id Id string `json:"id"` // execution name Name string `json:"name"` // name of the script ScriptName string `json:"scriptName"` // the type of script for this execution ScriptType string `json:"scriptType"` Status *ExecutionStatus `json:"status"` // test execution start time StartTime time.Time `json:"startTime,omitempty"` // test execution end time EndTime time.Time `json:"endTime,omitempty"` }
execution summary
type Executions ¶
type Executions []Execution
func (Executions) Table ¶
func (executions Executions) Table() (header []string, output [][]string)
type ExecutionsResult ¶
type ExecutionsResult struct { Totals *ExecutionsTotals `json:"totals"` Filtered *ExecutionsTotals `json:"filtered,omitempty"` Results []ExecutionSummary `json:"results"` }
the result for a page of executions
func (ExecutionsResult) Table ¶
func (result ExecutionsResult) Table() (header []string, output [][]string)
type ExecutionsTotals ¶
type ExecutionsTotals struct { // the total number of executions available Results int32 `json:"results"` // the total number of passed executions available Passed int32 `json:"passed"` // the total number of failed executions available Failed int32 `json:"failed"` // the total number of queued executions available Queued int32 `json:"queued"` // the total number of running executions available Pending int32 `json:"pending"` }
various execution counters
type Executor ¶ added in v0.6.4
type Executor struct { // ExecutorType one of \"rest\" for rest openapi based executors or \"job\" which will be default runners for testkube soon ExecutorType string `json:"executorType,omitempty"` // Image for kube-job Image string `json:"image,omitempty"` // Types defines what types can be handled by executor e.g. \"postman/collection\", \":curl/command\" etc Types []string `json:"types,omitempty"` // URI for rest based executors Uri string `json:"uri,omitempty"` // VolumeMountPath - where should PV be monted inside job pod for e.g. artifacts VolumeMountPath string `json:"volumeMountPath,omitempty"` // VolumeQuantity for kube-job PersistentVolume VolumeQuantity string `json:"volumeQuantity,omitempty"` }
CRD based executor data
type ExecutorCreateRequest ¶ added in v0.6.4
type ExecutorCreateRequest struct { // object kubernetes namespace Namespace string `json:"namespace"` // object name Name string `json:"name"` // ExecutorType one of \"rest\" for rest openapi based executors or \"job\" which will be default runners for testkube soon ExecutorType string `json:"executorType,omitempty"` // Image for kube-job Image string `json:"image,omitempty"` // Types defines what types can be handled by executor e.g. \"postman/collection\", \":curl/command\" etc Types []string `json:"types"` // URI for rest based executors Uri string `json:"uri,omitempty"` // VolumeMountPath - where should PV be monted inside job pod for e.g. artifacts VolumeMountPath string `json:"volumeMountPath,omitempty"` // VolumeQuantity for kube-job PersistentVolume VolumeQuantity string `json:"volumeQuantity,omitempty"` }
executor create request body
type ExecutorDetails ¶ added in v0.6.4
type ExecutorDetails struct { // Executor name Name string `json:"name,omitempty"` Executor *Executor `json:"executor,omitempty"` Executions *ExecutionsResult `json:"executions,omitempty"` }
Executor details with Executor data and additional information like list of executions
type ExecutorOutput ¶ added in v0.6.9
type ExecutorOutput struct { // One of possible output types Type_ string `json:"type"` // Message/event data passed from executor (like log lines etc) Content string `json:"content,omitempty"` Result *ExecutionResult `json:"result,omitempty"` }
CRD based executor data
type ExecutorStartRequest ¶
type ExecutorStartRequest struct { // ID of script execution to handle by executor, execution need to be able to return execution info based on this ID Id string `json:"id,omitempty"` // script type Type_ string `json:"type,omitempty"` // script execution custom name Name string `json:"name,omitempty"` // execution params passed to executor Params map[string]string `json:"params,omitempty"` // script content as string (content depends from executor) Content string `json:"content,omitempty"` // script content type can be: - direct content - created from file, - git repository with path, will be checked out, useful when test have more than one file or complicated directory structure, InputType string `json:"inputType,omitempty"` Repository *Repository `json:"repository,omitempty"` }
scripts execution request body when calling new execution request
type ExecutorsDetails ¶ added in v0.6.4
type ExecutorsDetails []ExecutorDetails
func (ExecutorsDetails) Table ¶ added in v0.6.4
func (list ExecutorsDetails) Table() (header []string, output [][]string)
type Problem ¶
type Problem struct { // Type contains a URI that identifies the problem type. This URI will, Type_ string `json:"type,omitempty"` // Title is a short, human-readable summary of the problem type. This title SHOULD NOT change from occurrence to occurrence of the problem, except forpurposes of localization. Title string `json:"title,omitempty"` // HTTP status code for this occurrence of the problem. Status int32 `json:"status,omitempty"` // A human-readable explanation specific to this occurrence of the problem. Detail string `json:"detail,omitempty"` // A URI that identifies the specific occurrence of the problem. This URI may or may not yield further information if de-referenced. Instance string `json:"instance,omitempty"` }
problem response in case of error
type Repository ¶
type Repository struct { // VCS repository type Type_ string `json:"type"` // uri of content file or git directory Uri string `json:"uri"` // branch/tag name for checkout Branch string `json:"branch"` // if needed we can checkout particular path (dir or file) in case of BIG/mono repositories Path string `json:"path,omitempty"` }
repository representation for tests in git repositories
type ScriptUpsertRequest ¶ added in v0.7.3
type ScriptUpsertRequest struct { // script name - Custom Resource name - must be unique, use only lowercase numbers and dashes (-) Name string `json:"name,omitempty"` // script type - what executor type should be used during test execution Type_ string `json:"type,omitempty"` // kubernetes namespace (defaults to 'testkube') Namespace string `json:"namespace,omitempty"` // script content type can be: - direct content - created from file, - git repo directory checkout in case when test is some kind of project or have more than one file, InputType string `json:"inputType,omitempty"` Tags []string `json:"tags,omitempty"` Repository *Repository `json:"repository,omitempty"` // script content - executor specific e.g. fo postman-collections executor Content string `json:"content,omitempty"` }
scripts create request body
type ServerInfo ¶ added in v0.6.2
type ServerInfo struct { // build version Version string `json:"version"` // build commit Commit string `json:"commit,omitempty"` }
Server information with build version, build commit etc.
type Test ¶ added in v0.7.5
type Test struct { Name string `json:"name"` Namespace string `json:"namespace,omitempty"` Description string `json:"description,omitempty"` // Run this step before whole suite Before []TestStep `json:"before,omitempty"` // test tags Tags []string `json:"tags,omitempty"` // Steps to run Steps []TestStep `json:"steps"` // Run this step after whole suite After []TestStep `json:"after,omitempty"` Repeats int32 `json:"repeats,omitempty"` }
func (*Test) UnmarshalJSON ¶ added in v0.7.6
type TestBase ¶ added in v0.7.6
type TestBase struct { Name string `json:"name"` Description string `json:"description,omitempty"` // Run this step before whole suite Before []map[string]interface{} `json:"before,omitempty"` // Steps to run Steps []map[string]interface{} `json:"steps"` // Run this step after whole suite After []map[string]interface{} `json:"after,omitempty"` Repeats int32 `json:"repeats,omitempty"` }
TODO rethink this struct and handling as for now we want to simplify OpenAPI spec and this one need to be manually synchronized with genered files on change! TestBase Intermidiate struct to handle convertion from interface to structs for steps
type TestCreateRequest ¶ added in v0.7.6
type TestCreateRequest struct { // object kubernetes namespace Namespace string `json:"namespace"` // object name Name string `json:"name"` Description string `json:"description,omitempty"` // Run this step before whole suite Before []TestStep `json:"before,omitempty"` // Steps to run Steps []TestStep `json:"steps"` // Run this step after whole suite After []TestStep `json:"after,omitempty"` Repeats int32 `json:"repeats,omitempty"` }
test create request body
type TestExecution ¶ added in v0.7.5
type TestExecution struct { // execution id Id string `json:"id"` // execution name Name string `json:"name"` Test *ObjectRef `json:"test"` Status *TestStatus `json:"status,omitempty"` // environment variables passed to executor Envs map[string]string `json:"envs,omitempty"` // execution params passed to executor converted to vars for usage in tests Params map[string]string `json:"params,omitempty"` // test start time StartTime time.Time `json:"startTime,omitempty"` // test end time EndTime time.Time `json:"endTime,omitempty"` // steps execution restults StepResults []TestStepExecutionResult `json:"stepResults,omitempty"` // test execution tags Tags []string `json:"tags,omitempty"` }
API server test scripts executions container
func NewStartedTestExecution ¶ added in v0.7.6
func NewStartedTestExecution(name string) TestExecution
type TestExecutionRequest ¶ added in v0.7.6
type TestExecutionRequest struct { // script execution custom name Name string `json:"name,omitempty"` // script kubernetes namespace (\"testkube\" when not set) Namespace string `json:"namespace,omitempty"` // execution params passed to executor Params map[string]string `json:"params,omitempty"` }
test execution request body
type TestExecutionSummary ¶ added in v0.7.6
type TestExecutionSummary struct { // execution id Id string `json:"id"` // execution name Name string `json:"name"` // name of the script TestName string `json:"testName"` Status *TestStatus `json:"status"` // test execution start time StartTime time.Time `json:"startTime,omitempty"` // test execution end time EndTime time.Time `json:"endTime,omitempty"` Execution []TestStepExecutionSummary `json:"execution,omitempty"` }
test execution summary
type TestExecutionsResult ¶ added in v0.7.6
type TestExecutionsResult struct { Totals *ExecutionsTotals `json:"totals"` Filtered *ExecutionsTotals `json:"filtered,omitempty"` Results []TestExecutionSummary `json:"results"` }
the result for a page of executions
type TestStatus ¶ added in v0.7.6
type TestStatus string
const ( QUEUED_TestStatus TestStatus = "queued" PENDING_TestStatus TestStatus = "pending" SUCCESS_TestStatus TestStatus = "success" ERROR__TestStatus TestStatus = "error" )
List of TestStatus
func TestStatusPtr ¶ added in v0.7.6
func TestStatusPtr(status TestStatus) *TestStatus
type TestStep ¶ added in v0.7.5
type TestStep interface { // Full name generated by implementation FullName() string // Type to allow do decompose to valid type easier Type() TestStepType // StopOnFailure returns if step failure will hold test suite execution StopOnFailure() bool }
type TestStepBase ¶ added in v0.7.6
type TestStepBase map[string]interface{}
func (TestStepBase) FullName ¶ added in v0.7.6
func (ts TestStepBase) FullName() string
func (TestStepBase) GetTestStep ¶ added in v0.7.6
func (ts TestStepBase) GetTestStep() (out TestStep)
func (TestStepBase) StopOnFailure ¶ added in v0.7.6
func (ts TestStepBase) StopOnFailure() bool
func (TestStepBase) Type ¶ added in v0.7.6
func (ts TestStepBase) Type() string
type TestStepDelay ¶ added in v0.7.5
type TestStepDelay struct { StopTestOnFailure bool `json:"stopTestOnFailure"` Type_ string `json:"type"` // step name (in case of script it'll be script name) Name string `json:"name"` // delay duration in milliseconds Duration int32 `json:"duration"` }
func NewDelayTestStepFromMap ¶ added in v0.7.6
func NewDelayTestStepFromMap(in map[string]interface{}) (ts TestStepDelay, err error)
func (TestStepDelay) FullName ¶ added in v0.7.5
func (s TestStepDelay) FullName() string
func (TestStepDelay) StopOnFailure ¶ added in v0.7.6
func (s TestStepDelay) StopOnFailure() bool
func (TestStepDelay) Type ¶ added in v0.7.6
func (s TestStepDelay) Type() TestStepType
type TestStepExecuteScript ¶ added in v0.7.5
type TestStepExecuteScript struct { // object kubernetes namespace Namespace string `json:"namespace,omitempty"` // object name Name string `json:"name"` StopTestOnFailure bool `json:"stopTestOnFailure"` Type_ string `json:"type"` }
func NewExecuteScriptTestStepFromMap ¶ added in v0.7.6
func NewExecuteScriptTestStepFromMap(in map[string]interface{}) (ts TestStepExecuteScript, err error)
func (TestStepExecuteScript) FullName ¶ added in v0.7.5
func (s TestStepExecuteScript) FullName() string
func (TestStepExecuteScript) StopOnFailure ¶ added in v0.7.6
func (s TestStepExecuteScript) StopOnFailure() bool
func (TestStepExecuteScript) Type ¶ added in v0.7.6
func (s TestStepExecuteScript) Type() TestStepType
type TestStepExecutionResult ¶ added in v0.7.5
type TestStepExecutionResult struct { Step *TestStep `json:"step,omitempty"` Script *ObjectRef `json:"script,omitempty"` Execution *Execution `json:"execution,omitempty"` }
execution result returned from executor
func (*TestStepExecutionResult) Err ¶ added in v0.7.6
func (r *TestStepExecutionResult) Err(err error) TestStepExecutionResult
func (*TestStepExecutionResult) IsFailed ¶ added in v0.7.6
func (r *TestStepExecutionResult) IsFailed() bool
func (*TestStepExecutionResult) UnmarshalJSON ¶ added in v0.7.6
func (result *TestStepExecutionResult) UnmarshalJSON(data []byte) error
type TestStepExecutionSummary ¶ added in v0.7.6
type TestStepExecutionSummary struct { Id string `json:"id"` // execution name Name string `json:"name"` Status *ExecutionStatus `json:"status"` Type_ string `json:"type,omitempty"` }
test execution summary
type TestStepType ¶ added in v0.7.6
type TestStepType string
const ( EXECUTE_SCRIPT_TestStepType TestStepType = "executeScript" DELAY_TestStepType TestStepType = "delay" )
List of TestStepType
type TestUpsertRequest ¶ added in v0.7.6
type TestUpsertRequest struct { // object kubernetes namespace Namespace string `json:"namespace"` // object name Name string `json:"name"` Description string `json:"description,omitempty"` // Run this step before whole suite Before []TestStep `json:"before,omitempty"` // test tags Tags []string `json:"tags,omitempty"` // Steps to run Steps []TestStep `json:"steps"` // Run this step after whole suite After []TestStep `json:"after,omitempty"` Repeats int32 `json:"repeats,omitempty"` }
test create request body
Source Files ¶
- model_artifact.go
- model_artifact_extended.go
- model_assertion_result.go
- model_execution.go
- model_execution_extended.go
- model_execution_request.go
- model_execution_result.go
- model_execution_result_extended.go
- model_execution_result_step.go
- model_execution_result_step_assertion.go
- model_execution_status.go
- model_execution_status_extended.go
- model_execution_step_result.go
- model_execution_summary.go
- model_executions_result.go
- model_executions_result_extended.go
- model_executions_totals.go
- model_executor.go
- model_executor_create_request.go
- model_executor_details.go
- model_executor_details_extended.go
- model_executor_output.go
- model_executor_start_request.go
- model_executor_start_request_extended.go
- model_key_value.go
- model_object_ref.go
- model_problem.go
- model_repository.go
- model_script.go
- model_script_extended.go
- model_script_upsert_request.go
- model_server_info.go
- model_status.go
- model_test_base.go
- model_test_base_extended.go
- model_test_create_request.go
- model_test_execution.go
- model_test_execution_extended.go
- model_test_execution_request.go
- model_test_execution_summary.go
- model_test_executions_result.go
- model_test_status.go
- model_test_status_extended.go
- model_test_step_delay.go
- model_test_step_delay_extended.go
- model_test_step_execute_script.go
- model_test_step_execute_script_extended.go
- model_test_step_execution_result.go
- model_test_step_execution_result_extended.go
- model_test_step_execution_summary.go
- model_test_step_interface.go
- model_test_step_type.go
- model_test_upsert_request.go