kubtest

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* kubtest * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - kubtest provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@kubtest.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* kubtest * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - kubtest provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@kubtest.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* kubtest * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - kubtest provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.1 * Contact: api@kubtest.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kubtest API * * Kubtest provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: kubtest@kubshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

View Source
const (
	// ExecutionStatusQueued status for execution which is added for queue but not get yet by worker
	ExecutionStatusQueued = "queued"
	// ExecutionStatusPending status for execution which is taken by worker
	ExecutionStatusPending = "pending"
	// ExecutionStatusSuceess execution complete with success
	ExecutionStatusSuceess = "success"
	// ExecutionStatusSuceess execution failed
	ExecutionStatusError = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssertionResult

type AssertionResult struct {
	Name         string `json:"name,omitempty"`
	Status       string `json:"status,omitempty"`
	ErrorMessage string `json:"error-message,omitempty"`
}

execution result data

type Execution

type Execution struct {
	// execution id
	Id string `json:"id,omitempty"`
	// script metadata content
	ScriptContent string      `json:"script-content,omitempty"`
	Repository    *Repository `json:"repository,omitempty"`
	// execution params passed to executor
	Params map[string]string `json:"params,omitempty"`
	// execution status
	Status string           `json:"status,omitempty"`
	Result *ExecutionResult `json:"result,omitempty"`
	// test start time
	StartTime time.Time `json:"start-time,omitempty"`
	// test end time
	EndTime time.Time `json:"end-time,omitempty"`
}

execution result returned from executor

func NewExecution

func NewExecution() Execution

func (*Execution) Duration

func (e *Execution) Duration() time.Duration

func (*Execution) Error

func (e *Execution) Error()

func (*Execution) IsCompleted

func (e *Execution) IsCompleted() bool

func (*Execution) IsFailed

func (e *Execution) IsFailed() bool

func (*Execution) IsPending

func (e *Execution) IsPending() bool

func (*Execution) IsQueued

func (e *Execution) IsQueued() bool

func (*Execution) IsSuccesful

func (e *Execution) IsSuccesful() bool

func (*Execution) Start

func (e *Execution) Start()

func (*Execution) Stop

func (e *Execution) Stop()

func (*Execution) Success

func (e *Execution) Success()

func (*Execution) WithContent

func (e *Execution) WithContent(content string) *Execution

func (*Execution) WithParams

func (e *Execution) WithParams(params map[string]string) *Execution

func (*Execution) WithRepository

func (e *Execution) WithRepository(repository *Repository) *Execution

func (*Execution) WithRepositoryData

func (e *Execution) WithRepositoryData(uri, branch, path string) *Execution

type ExecutionRequest

type ExecutionRequest struct {
	// 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 repo directory checkout in case when test is some kind of project or have more than one file,
	InputType  string      `json:"input-type,omitempty"`
	Repository *Repository `json:"repository,omitempty"`
}

scripts execution request body

type ExecutionResult

type ExecutionResult struct {
	// script execution status
	Status string `json:"status,omitempty"`
	// RAW Script execution output, depends of reporter used in particular tool
	RawOutput string `json:"raw-output,omitempty"`
	// output type depends of reporter used in partucular tool
	RawOutputType string `json:"raw-output-type,omitempty"`
	// error message when status is failed, separate to output as output can be partial in case of error
	ErrorMessage string `json:"error-message,omitempty"`
	// script execution start time
	StartTime time.Time `json:"start-time,omitempty"`
	// script execution start time
	EndTime time.Time `json:"end-time,omitempty"`
	// execution steps (for collection of requests)
	Steps []ExecutionStepResult `json:"steps,omitempty"`
}

execution result data

func (ExecutionResult) Err

type ExecutionResultStep

type ExecutionResultStep struct {
	// step name
	Name string `json:"name,omitempty"`
	// script execution start time
	StartTime time.Time `json:"start-time,omitempty"`
	// script execution start time
	EndTime time.Time `json:"end-time,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:"error-message,omitempty"`
}

execution result data

type ExecutionStepResult

type ExecutionStepResult struct {
	// step name
	Name     string `json:"name,omitempty"`
	Duration string `json:"duration,omitempty"`
	// execution step status
	Status           string            `json:"status,omitempty"`
	AssertionResults []AssertionResult `json:"assertionResults,omitempty"`
}

execution result data

type ExecutionSummary

type ExecutionSummary struct {
	// execution id
	Id string `json:"id,omitempty"`
	// name of the script
	ScriptName string `json:"script-name,omitempty"`
	// the type of script for this execution
	ScriptType string `json:"script-type,omitempty"`
	// execution status
	Status string `json:"status,omitempty"`
	// test execution start time
	StartTime time.Time `json:"start-time,omitempty"`
	// test execution end time
	EndTime time.Time `json:"end-time,omitempty"`
}

execution summary

type KeyValue

type KeyValue struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

environment variable

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"`
}

scripts execution request body

type Script

type Script struct {
	// script name
	Name string `json:"name,omitempty"`
	// script type
	Type_ string `json:"type,omitempty"`
	// script content
	Content string    `json:"content,omitempty"`
	Created time.Time `json:"created,omitempty"`
}

type ScriptCreateRequest

type ScriptCreateRequest struct {
	// script name - Custom Resource name - must be unique
	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 'default')
	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:"input-type,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 ScriptExecution

type ScriptExecution struct {
	// execution id
	Id string `json:"id,omitempty"`
	// unique script name (CRD Script name)
	ScriptName string `json:"script-name,omitempty"`
	// script type e.g. postman/collection
	ScriptType string `json:"script-type,omitempty"`
	// execution name
	Name string `json:"name,omitempty"`
	// execution envs passed to executor
	Envs map[string]string `json:"envs,omitempty"`
	// execution params passed to executor
	Params    map[string]string `json:"params,omitempty"`
	Execution *Execution        `json:"execution,omitempty"`
}

API server script execution

func NewScriptExecution

func NewScriptExecution(scriptName, name string, execution Execution, params map[string]string) ScriptExecution

type ScriptExecutionRequest

type ScriptExecutionRequest struct {
	// script execution custom name
	Name string `json:"name,omitempty"`
	// script kubernetes namespace (\"default\" when not set)
	Namespace string `json:"namespace,omitempty"`
	// execution params passed to executor
	Params map[string]string `json:"params,omitempty"`
}

scripts execution request body

type ScriptExecutions

type ScriptExecutions []ScriptExecution

func (ScriptExecutions) Table

func (executions ScriptExecutions) Table() (header []string, output [][]string)

type Scripts

type Scripts []Script

func (Scripts) Table

func (scripts Scripts) Table() (header []string, output [][]string)

Jump to

Keyboard shortcuts

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