testkube

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 13 Imported by: 32

Documentation

Overview

content could be fetched as file or dir (many files, e.g. Cypress project) in executor

Index

Constants

View Source
const (
	//TestLabelTestType is a test label for a test type
	TestLabelTestType = "test-type"
	// TestLabelExecutor is a test label for an executor
	TestLabelExecutor = "executor"
	// TestLabelTestName is a test label for a test name
	TestLabelTestName = "test-name"
)

Variables

View Source
var (
	EventResourceTest               = EventResourcePtr(TEST_EventResource)
	EventResourceTestsuite          = EventResourcePtr(TESTSUITE_EventResource)
	EventResourceExecutor           = EventResourcePtr(EXECUTOR_EventResource)
	EventResourceTrigger            = EventResourcePtr(TRIGGER_EventResource)
	EventResourceWebhook            = EventResourcePtr(WEBHOOK_EventResource)
	EventResourceTestexecution      = EventResourcePtr(TESTEXECUTION_EventResource)
	EventResourceTestsuiteexecution = EventResourcePtr(TESTSUITEEXECUTION_EventResource)
)
View Source
var (
	EventStartTest           = EventTypePtr(START_TEST_EventType)
	EventEndTestSuccess      = EventTypePtr(END_TEST_SUCCESS_EventType)
	EventEndTestFailed       = EventTypePtr(END_TEST_FAILED_EventType)
	EventEndTestAborted      = EventTypePtr(END_TEST_ABORTED_EventType)
	EventEndTestTimeout      = EventTypePtr(END_TEST_TIMEOUT_EventType)
	EventStartTestSuite      = EventTypePtr(START_TESTSUITE_EventType)
	EventEndTestSuiteSuccess = EventTypePtr(END_TESTSUITE_SUCCESS_EventType)
	EventEndTestSuiteFailed  = EventTypePtr(END_TESTSUITE_FAILED_EventType)
	EventEndTestSuiteAborted = EventTypePtr(END_TESTSUITE_ABORTED_EventType)
	EventEndTestSuiteTimeout = EventTypePtr(END_TESTSUITE_TIMEOUT_EventType)
	EventCreated             = EventTypePtr(CREATED_EventType)
	EventDeleted             = EventTypePtr(DELETED_EventType)
	EventUpdated             = EventTypePtr(UPDATED_EventType)
)
View Source
var (
	ExecutionStatusFailed  = StatusPtr(FAILED_ExecutionStatus)
	ExecutionStatusPassed  = StatusPtr(PASSED_ExecutionStatus)
	ExecutionStatusQueued  = StatusPtr(QUEUED_ExecutionStatus)
	ExecutionStatusRunning = StatusPtr(RUNNING_ExecutionStatus)
	ExecutionStatusAborted = StatusPtr(ABORTED_ExecutionStatus)
	ExecutionStatusTimeout = StatusPtr(TIMEOUT_ExecutionStatus)
)
View Source
var (
	TestSuiteStepTypeExecuteTest = TestSuiteStepTypePtr(EXECUTE_TEST_TestSuiteStepType)
	TestSuiteStepTypeDelay       = TestSuiteStepTypePtr(DELAY_TestSuiteStepType)
)
View Source
var ErrTestContentTypeNotDir = fmt.Errorf("unsupported content type use one of: git-dir")
View Source
var ErrTestContentTypeNotFile = fmt.Errorf("unsupported content type use one of: file-uri, git-file, string")
View Source
var VariableTypeSecret = VariableTypePtr(SECRET_VariableType)

Functions

func MapToString added in v1.1.10

func MapToString(m map[string]string) string

func PrepareExecutorArgs added in v1.6.16

func PrepareExecutorArgs(binaryArgs []string) ([]string, error)

func ValidateUpdateTestRequest added in v1.10.5

func ValidateUpdateTestRequest(test TestUpdateRequest) error

func ValidateUpsertTestRequest added in v1.10.5

func ValidateUpsertTestRequest(test TestUpsertRequest) error

func VariableTypeString added in v1.13.8

func VariableTypeString(ptr *VariableType) string

func VariablesToMap added in v1.1.10

func VariablesToMap(v Variables) map[string]string

Types

type ArgsModeType added in v1.11.25

type ArgsModeType string
const (
	ArgsModeTypeAppend   ArgsModeType = "append"
	ArgsModeTypeOverride ArgsModeType = "override"
)

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"`
	// execution name that produced the artifact
	ExecutionName string `json:"executionName,omitempty"`
}

API server artifact

type ArtifactRequest added in v1.7.16

type ArtifactRequest struct {
	// artifact storage class name for container executor
	StorageClassName string `json:"storageClassName,omitempty"`
	// artifact volume mount path for container executor
	VolumeMountPath string `json:"volumeMountPath,omitempty"`
	// artifact directories for scraping
	Dirs []string `json:"dirs,omitempty"`
	// artifact bucket storage
	StorageBucket string `json:"storageBucket,omitempty"`
	// don't use a separate folder for execution artifacts
	OmitFolderPerExecution bool `json:"omitFolderPerExecution,omitempty"`
}

artifact request body with test artifacts

type ArtifactUpdateRequest added in v1.7.29

type ArtifactUpdateRequest struct {
	// artifact storage class name for container executor
	StorageClassName *string `json:"storageClassName,omitempty"`
	// artifact volume mount path for container executor
	VolumeMountPath *string `json:"volumeMountPath,omitempty"`
	// artifact directories for scraping
	Dirs *[]string `json:"dirs,omitempty"`
	// artifact bucket storage
	StorageBucket *string `json:"storageBucket,omitempty"`
	// don't use a separate folder for execution artifacts
	OmitFolderPerExecution *bool `json:"omitFolderPerExecution,omitempty"`
}

artifact request update body

func (*ArtifactUpdateRequest) IsEmpty added in v1.8.36

func (a *ArtifactUpdateRequest) IsEmpty() bool

IsEmpty check if request is empty

type Artifacts added in v0.6.9

type Artifacts []Artifact

func (Artifacts) Table added in v0.6.9

func (artifacts Artifacts) Table() (header []string, output [][]string)

type AssertionResult

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

execution result data

type Config added in v1.0.22

type Config struct {
	Id              string `json:"id"`
	ClusterId       string `json:"clusterId"`
	EnableTelemetry bool   `json:"enableTelemetry"`
}

Testkube API config data structure

type ConfigMapRef added in v1.9.15

type ConfigMapRef 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 data in Kubernetes config maps

type DebugInfo added in v1.3.45

type DebugInfo struct {
	ClientVersion  string              `json:"clientVersion,omitempty"`
	ServerVersion  string              `json:"serverVersion,omitempty"`
	ClusterVersion string              `json:"clusterVersion,omitempty"`
	ApiLogs        []string            `json:"apiLogs,omitempty"`
	OperatorLogs   []string            `json:"operatorLogs,omitempty"`
	ExecutionLogs  map[string][]string `json:"executionLogs,omitempty"`
}

Testkube debug info

func (DebugInfo) Table added in v1.3.45

func (d DebugInfo) Table() (header []string, output [][]string)

Table builds up a table from parts of the DebugInfo that are short and easy to read - no logs

type DebugInfoExecutionLogs added in v1.3.45

type DebugInfoExecutionLogs struct {
	Items string `json:"items,omitempty"`
}

type DownloadArtifactOptions added in v1.15.14

type DownloadArtifactOptions struct {
	AllPreviousSteps bool `json:"allPreviousSteps,omitempty"`
	// previous step numbers starting from 1
	PreviousStepNumbers []int32 `json:"previousStepNumbers,omitempty"`
}

options to download artifacts from previous steps

type EnvReference added in v1.9.15

type EnvReference struct {
	Reference *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

type Event added in v1.5.7

type Event struct {
	// UUID of event
	Id       string         `json:"id"`
	Resource *EventResource `json:"resource"`
	// ID of resource
	ResourceId         string              `json:"resourceId"`
	Type_              *EventType          `json:"type"`
	TestExecution      *Execution          `json:"testExecution,omitempty"`
	TestSuiteExecution *TestSuiteExecution `json:"testSuiteExecution,omitempty"`
	// cluster name of event
	ClusterName string `json:"clusterName,omitempty"`
	// environment variables
	Envs map[string]string `json:"envs,omitempty"`
}

Event data

func NewEvent added in v1.10.21

func NewEvent(t *EventType, resource *EventResource, id string) Event

func NewEventEndTestAborted added in v1.6.26

func NewEventEndTestAborted(execution *Execution) Event

func NewEventEndTestFailed added in v1.5.17

func NewEventEndTestFailed(execution *Execution) Event

func NewEventEndTestSuccess added in v1.5.17

func NewEventEndTestSuccess(execution *Execution) Event

func NewEventEndTestSuiteAborted added in v1.6.29

func NewEventEndTestSuiteAborted(execution *TestSuiteExecution) Event

func NewEventEndTestSuiteFailed added in v1.5.17

func NewEventEndTestSuiteFailed(execution *TestSuiteExecution) Event

func NewEventEndTestSuiteSuccess added in v1.5.17

func NewEventEndTestSuiteSuccess(execution *TestSuiteExecution) Event

func NewEventEndTestSuiteTimeout added in v1.6.39

func NewEventEndTestSuiteTimeout(execution *TestSuiteExecution) Event

func NewEventEndTestTimeout added in v1.6.26

func NewEventEndTestTimeout(execution *Execution) Event

func NewEventStartTest added in v1.5.7

func NewEventStartTest(execution *Execution) Event

func NewEventStartTestSuite added in v1.5.17

func NewEventStartTestSuite(execution *TestSuiteExecution) Event

func (Event) IsSuccess added in v1.5.18

func (e Event) IsSuccess() bool

func (Event) Log added in v1.5.7

func (e Event) Log() []any

func (Event) Topic added in v1.10.21

func (e Event) Topic() string

Topic returns topic for event based on resource and resource id or fallback to global "events" topic

func (Event) Type added in v1.5.17

func (e Event) Type() EventType

func (Event) Valid added in v1.5.7

func (e Event) Valid(selector string, types []EventType) (valid bool)

type EventResource added in v1.10.21

type EventResource string
const (
	TEST_EventResource               EventResource = "test"
	TESTSUITE_EventResource          EventResource = "testsuite"
	EXECUTOR_EventResource           EventResource = "executor"
	TRIGGER_EventResource            EventResource = "trigger"
	WEBHOOK_EventResource            EventResource = "webhook"
	TESTEXECUTION_EventResource      EventResource = "testexecution"
	TESTSUITEEXECUTION_EventResource EventResource = "testsuiteexecution"
)

List of EventResource

func EventResourcePtr added in v1.10.21

func EventResourcePtr(t EventResource) *EventResource

type EventResult added in v1.5.7

type EventResult struct {
	// UUID of event
	Id string `json:"id,omitempty"`
	// error message if any
	Error_ string `json:"error,omitempty"`
	// result of event
	Result string `json:"result,omitempty"`
}

Listener result after sending particular event

func NewFailedEventResult added in v1.5.7

func NewFailedEventResult(id string, err error) EventResult

func NewSuccessEventResult added in v1.5.7

func NewSuccessEventResult(id string, result string) EventResult

func (EventResult) Error added in v1.5.7

func (l EventResult) Error() string

func (EventResult) WithResult added in v1.5.7

func (l EventResult) WithResult(result string) EventResult

type EventType added in v1.5.7

type EventType string
const (
	START_TEST_EventType            EventType = "start-test"
	END_TEST_SUCCESS_EventType      EventType = "end-test-success"
	END_TEST_FAILED_EventType       EventType = "end-test-failed"
	END_TEST_ABORTED_EventType      EventType = "end-test-aborted"
	END_TEST_TIMEOUT_EventType      EventType = "end-test-timeout"
	START_TESTSUITE_EventType       EventType = "start-testsuite"
	END_TESTSUITE_SUCCESS_EventType EventType = "end-testsuite-success"
	END_TESTSUITE_FAILED_EventType  EventType = "end-testsuite-failed"
	END_TESTSUITE_ABORTED_EventType EventType = "end-testsuite-aborted"
	END_TESTSUITE_TIMEOUT_EventType EventType = "end-testsuite-timeout"
	CREATED_EventType               EventType = "created"
	UPDATED_EventType               EventType = "updated"
	DELETED_EventType               EventType = "deleted"
)

List of EventType

func EventTypePtr added in v1.5.7

func EventTypePtr(t EventType) *EventType

func EventTypesFromSlice added in v1.5.7

func EventTypesFromSlice(types []string) []EventType

func (EventType) String added in v1.5.7

func (t EventType) String() string

type Execution

type Execution struct {
	// execution id
	Id string `json:"id,omitempty"`
	// unique test name (CRD Test name)
	TestName string `json:"testName,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 namespace
	TestNamespace string `json:"testNamespace,omitempty"`
	// test type e.g. postman/collection
	TestType string `json:"testType,omitempty"`
	// execution name
	Name string `json:"name,omitempty"`
	// execution number
	Number int32 `json:"number,omitempty"`
	// Environment variables passed to executor.
	// Deprecated: use Basic Variables instead
	Envs map[string]string `json:"envs,omitempty"`
	// executor image command
	Command []string `json:"command,omitempty"`
	// additional arguments/flags passed to executor binary
	Args []string `json:"args,omitempty"`
	// usage mode for arguments
	ArgsMode  string              `json:"args_mode,omitempty"`
	Variables map[string]Variable `json:"variables,omitempty"`
	// in case the variables file is too big, it will be uploaded to storage
	IsVariablesFileUploaded bool `json:"isVariablesFileUploaded,omitempty"`
	// variables file content - need to be in format for particular executor (e.g. postman envs file)
	VariablesFile string `json:"variablesFile,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"`
	Content             *TestContent `json:"content,omitempty"`
	// test start time
	StartTime time.Time `json:"startTime,omitempty"`
	// test end time
	EndTime time.Time `json:"endTime,omitempty"`
	// test duration
	Duration string `json:"duration,omitempty"`
	// test duration in milliseconds
	DurationMs      int32            `json:"durationMs,omitempty"`
	ExecutionResult *ExecutionResult `json:"executionResult,omitempty"`
	// test and execution labels
	Labels map[string]string `json:"labels,omitempty"`
	// list of file paths that need to be copied into the test from uploads
	Uploads []string `json:"uploads,omitempty"`
	// minio bucket name to get uploads from
	BucketName      string           `json:"bucketName,omitempty"`
	ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"`
	// script to run before test execution
	PreRunScript string `json:"preRunScript,omitempty"`
	// script to run after test execution
	PostRunScript string `json:"postRunScript,omitempty"`
	// execute post run script before scraping (prebuilt executor only)
	ExecutePostRunScriptBeforeScraping bool            `json:"executePostRunScriptBeforeScraping,omitempty"`
	RunningContext                     *RunningContext `json:"runningContext,omitempty"`
	// shell used in container executor
	ContainerShell string `json:"containerShell,omitempty"`
	// test execution name started the test execution
	TestExecutionName string `json:"testExecutionName,omitempty"`
	// execution ids for artifacts to download
	DownloadArtifactExecutionIDs []string `json:"downloadArtifactExecutionIDs,omitempty"`
}

test execution

func NewExecution

func NewExecution(id, testNamespace, testName, testSuiteName, executionName, testType string,
	executionNumber int, content *TestContent, result ExecutionResult,
	variables map[string]Variable, testSecretUUID, testSuiteSecretUUID string,
	labels map[string]string) Execution

func NewExecutionWithID

func NewExecutionWithID(id, testType, testName string) *Execution

func NewFailedExecution added in v0.7.6

func NewFailedExecution(err error) Execution

func NewQueuedExecution added in v0.8.4

func NewQueuedExecution() *Execution

NewQueued execution for executions status used in test executions

func (*Execution) CalculateDuration added in v0.7.20

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

func (*Execution) Err

func (e *Execution) Err(err error) Execution

func (*Execution) Errw added in v0.7.6

func (e *Execution) Errw(id, msg string, err error) Execution

func (*Execution) EscapeDots added in v1.12.12

func (e *Execution) EscapeDots() *Execution

func (Execution) IsAborted added in v1.6.33

func (e Execution) IsAborted() bool

func (Execution) IsCanceled added in v1.6.25

func (e Execution) IsCanceled() bool

func (Execution) IsFailed added in v0.7.6

func (e Execution) IsFailed() bool

func (Execution) IsPassed added in v1.11.25

func (e Execution) IsPassed() bool

func (Execution) IsQueued added in v1.5.33

func (e Execution) IsQueued() bool

func (Execution) IsRunning added in v1.5.33

func (e Execution) IsRunning() bool

func (Execution) IsTimeout added in v1.6.26

func (e Execution) IsTimeout() bool

func (*Execution) Start added in v0.6.4

func (e *Execution) Start()

func (*Execution) Stop added in v0.6.4

func (e *Execution) Stop()

func (*Execution) UnscapeDots added in v1.12.12

func (e *Execution) UnscapeDots() *Execution

func (*Execution) WithContent

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

func (*Execution) WithID added in v1.12.12

func (e *Execution) WithID() *Execution

func (*Execution) WithVariables added in v1.1.10

func (e *Execution) WithVariables(variables map[string]Variable) *Execution

type ExecutionCore added in v1.8.17

type ExecutionCore struct {
	// execution id
	Id string `json:"id,omitempty"`
	// execution number
	Number int32 `json:"number,omitempty"`
	// test start time
	StartTime time.Time `json:"startTime,omitempty"`
	// test end time
	EndTime time.Time        `json:"endTime,omitempty"`
	Status  *ExecutionStatus `json:"status,omitempty"`
}

test execution core

type ExecutionRequest

type ExecutionRequest struct {
	// execution id
	Id string `json:"id,omitempty"`
	// 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"`
	// in case the variables file is too big, it will be uploaded
	IsVariablesFileUploaded bool `json:"isVariablesFileUploaded,omitempty"`
	// variables file content - need to be in format for particular executor (e.g. postman envs file)
	VariablesFile string              `json:"variablesFile,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"`
	// executor image command
	Command []string `json:"command,omitempty"`
	// additional executor binary arguments
	Args []string `json:"args,omitempty"`
	// usage mode for arguments
	ArgsMode string `json:"args_mode,omitempty"`
	// container image, executor will run inside this image
	Image string `json:"image,omitempty"`
	// container image pull secrets
	ImagePullSecrets []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"`
	// whether to run test as negative test
	NegativeTest bool `json:"negativeTest,omitempty"`
	// whether negativeTest was changed by user
	IsNegativeTestChangedOnRun bool `json:"isNegativeTestChangedOnRun,omitempty"`
	// duration in seconds the test may be active, until its stopped
	ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds,omitempty"`
	// list of file paths that need to be copied into the test from uploads
	Uploads []string `json:"uploads,omitempty"`
	// minio bucket name to get uploads from
	BucketName      string           `json:"bucketName,omitempty"`
	ArtifactRequest *ArtifactRequest `json:"artifactRequest,omitempty"`
	// job template extensions
	JobTemplate string `json:"jobTemplate,omitempty"`
	// name of the template resource
	JobTemplateReference string `json:"jobTemplateReference,omitempty"`
	// cron job template extensions
	CronJobTemplate string `json:"cronJobTemplate,omitempty"`
	// name of the template resource
	CronJobTemplateReference string              `json:"cronJobTemplateReference,omitempty"`
	ContentRequest           *TestContentRequest `json:"contentRequest,omitempty"`
	// script to run before test execution
	PreRunScript string `json:"preRunScript,omitempty"`
	// script to run after test execution
	PostRunScript string `json:"postRunScript,omitempty"`
	// execute post run script before scraping (prebuilt executor only)
	ExecutePostRunScriptBeforeScraping bool `json:"executePostRunScriptBeforeScraping,omitempty"`
	// scraper template extensions
	ScraperTemplate string `json:"scraperTemplate,omitempty"`
	// name of the template resource
	ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"`
	// pvc template extensions
	PvcTemplate string `json:"pvcTemplate,omitempty"`
	// name of the template resource
	PvcTemplateReference string `json:"pvcTemplateReference,omitempty"`
	// config map references
	EnvConfigMaps []EnvReference `json:"envConfigMaps,omitempty"`
	// secret references
	EnvSecrets     []EnvReference  `json:"envSecrets,omitempty"`
	RunningContext *RunningContext `json:"runningContext,omitempty"`
	// test execution name started the test execution
	TestExecutionName string `json:"testExecutionName,omitempty"`
	// execution ids for artifacts to download
	DownloadArtifactExecutionIDs []string `json:"downloadArtifactExecutionIDs,omitempty"`
}

test execution request body

type ExecutionResult

type ExecutionResult struct {
	Status *ExecutionStatus `json:"status"`
	// RAW Test execution output, depends of reporter used in particular tool
	Output string `json:"output,omitempty"`
	// output type depends of reporter used in particular 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"`
	Reports *ExecutionResultReports `json:"reports,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

NewPendingExecutionResult DEPRECATED since testkube@1.0.0

func NewRunningExecutionResult added in v1.1.10

func NewRunningExecutionResult() *ExecutionResult

func (*ExecutionResult) Abort added in v1.6.26

func (e *ExecutionResult) Abort()

func (*ExecutionResult) Err

func (e *ExecutionResult) Err(err error) *ExecutionResult

func (*ExecutionResult) Error

func (e *ExecutionResult) Error()

func (*ExecutionResult) FailedSteps added in v1.14.0

func (e *ExecutionResult) FailedSteps() (steps []ExecutionStepResult)

func (*ExecutionResult) FailedStepsCount added in v1.5.18

func (e *ExecutionResult) FailedStepsCount() int

func (*ExecutionResult) GetDeepCopy added in v1.9.8

func (e *ExecutionResult) GetDeepCopy() *ExecutionResult

GetDeepCopy gives a copy of ExecutionResult with new pointers

func (*ExecutionResult) InProgress added in v0.8.4

func (e *ExecutionResult) InProgress()

func (*ExecutionResult) IsAborted added in v1.6.26

func (e *ExecutionResult) IsAborted() bool

func (*ExecutionResult) IsCompleted

func (e *ExecutionResult) IsCompleted() bool

func (*ExecutionResult) IsFailed

func (e *ExecutionResult) IsFailed() bool

func (*ExecutionResult) IsPassed added in v0.11.7

func (e *ExecutionResult) IsPassed() bool

func (*ExecutionResult) IsQueued

func (e *ExecutionResult) IsQueued() bool

func (*ExecutionResult) IsRunning added in v0.11.7

func (e *ExecutionResult) IsRunning() bool

func (*ExecutionResult) IsTimeout added in v1.6.26

func (e *ExecutionResult) IsTimeout() bool

func (*ExecutionResult) Success

func (e *ExecutionResult) Success()

func (*ExecutionResult) Timeout added in v1.6.26

func (e *ExecutionResult) Timeout()

func (*ExecutionResult) WithErrors added in v0.8.8

func (e *ExecutionResult) WithErrors(errors ...error) *ExecutionResult

WithErrors return error result if any of passed errors is not nil

type ExecutionResultReports added in v1.2.19

type ExecutionResultReports struct {
	Junit string `json:"junit,omitempty"`
}

type ExecutionResultStep

type ExecutionResultStep struct {
	// step name
	Name string `json:"name,omitempty"`
	// test execution start time
	StartTime time.Time `json:"startTime,omitempty"`
	// test 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"
	RUNNING_ExecutionStatus ExecutionStatus = "running"
	PASSED_ExecutionStatus  ExecutionStatus = "passed"
	FAILED_ExecutionStatus  ExecutionStatus = "failed"
	ABORTED_ExecutionStatus ExecutionStatus = "aborted"
	TIMEOUT_ExecutionStatus ExecutionStatus = "timeout"
	SKIPPED_ExecutionStatus ExecutionStatus = "skipped"
)

List of ExecutionStatus

func StatusPtr

func StatusPtr(status ExecutionStatus) *ExecutionStatus

type ExecutionStatuses added in v1.0.5

type ExecutionStatuses []ExecutionStatus

ExecutionStatuses is an array of ExecutionStatus

func ParseExecutionStatusList added in v1.0.5

func ParseExecutionStatusList(source, separator string) (statusList ExecutionStatuses, err error)

ParseExecutionStatusList parse a list of execution statuses from string

func (ExecutionStatuses) ToMap added in v1.0.5

func (statuses ExecutionStatuses) ToMap() map[ExecutionStatus]struct{}

ToMap generates map from ExecutionStatuses

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"`
	// execution number
	Number int32 `json:"number,omitempty"`
	// name of the test
	TestName string `json:"testName"`
	// name of the test
	TestNamespace string `json:"testNamespace,omitempty"`
	// the type of test for this execution
	TestType string           `json:"testType"`
	Status   *ExecutionStatus `json:"status"`
	// test execution start time
	StartTime time.Time `json:"startTime,omitempty"`
	// test execution end time
	EndTime time.Time `json:"endTime,omitempty"`
	// calculated test duration
	Duration string `json:"duration,omitempty"`
	// calculated test duration in ms
	DurationMs int32 `json:"durationMs,omitempty"`
	// test and execution labels
	Labels         map[string]string `json:"labels,omitempty"`
	RunningContext *RunningContext   `json:"runningContext,omitempty"`
}

Execution summary

type ExecutionUpdateRequest added in v1.7.29

type ExecutionUpdateRequest struct {
	// execution id
	Id *string `json:"id,omitempty"`
	// 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"`
	// in case the variables file is too big, it will be uploaded
	IsVariablesFileUploaded *bool `json:"isVariablesFileUploaded,omitempty"`
	// variables file content - need to be in format for particular executor (e.g. postman envs file)
	VariablesFile *string              `json:"variablesFile,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"`
	// executor image command
	Command *[]string `json:"command,omitempty"`
	// additional executor binary arguments
	Args *[]string `json:"args,omitempty"`
	// usage mode for arguments
	ArgsMode *string `json:"args_mode,omitempty"`
	// container image, executor will run inside this image
	Image *string `json:"image,omitempty"`
	// container image pull secrets
	ImagePullSecrets *[]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"`
	// whether to run test as negative test
	NegativeTest *bool `json:"negativeTest,omitempty"`
	// whether negativeTest was changed by user
	IsNegativeTestChangedOnRun *bool `json:"isNegativeTestChangedOnRun,omitempty"`
	// duration in seconds the test may be active, until its stopped
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
	// list of file paths that need to be copied into the test from uploads
	Uploads *[]string `json:"uploads,omitempty"`
	// minio bucket name to get uploads from
	BucketName      *string                 `json:"bucketName,omitempty"`
	ArtifactRequest **ArtifactUpdateRequest `json:"artifactRequest,omitempty"`
	// job template extensions
	JobTemplate *string `json:"jobTemplate,omitempty"`
	// name of the template resource
	JobTemplateReference *string `json:"jobTemplateReference,omitempty"`
	// cron job template extensions
	CronJobTemplate *string `json:"cronJobTemplate,omitempty"`
	// name of the template resource
	CronJobTemplateReference *string                    `json:"cronJobTemplateReference,omitempty"`
	ContentRequest           **TestContentUpdateRequest `json:"contentRequest,omitempty"`
	// script to run before test execution
	PreRunScript *string `json:"preRunScript,omitempty"`
	// script to run after test execution
	PostRunScript *string `json:"postRunScript,omitempty"`
	// execute post run script before scraping (prebuilt executor only)
	ExecutePostRunScriptBeforeScraping *bool `json:"executePostRunScriptBeforeScraping,omitempty"`
	// scraper template extensions
	ScraperTemplate *string `json:"scraperTemplate,omitempty"`
	// name of the template resource
	ScraperTemplateReference *string `json:"scraperTemplateReference,omitempty"`
	// pvc template extensions
	PvcTemplate *string `json:"pvcTemplate,omitempty"`
	// name of the template resource
	PvcTemplateReference *string `json:"pvcTemplateReference,omitempty"`
	// config *map references
	EnvConfigMaps *[]EnvReference `json:"envConfigMaps,omitempty"`
	// secret references
	EnvSecrets     *[]EnvReference `json:"envSecrets,omitempty"`
	RunningContext *RunningContext `json:"runningContext,omitempty"`
	// test execution name started the test execution
	TestExecutionName *string `json:"testExecutionName,omitempty"`
	// execution ids for artifacts to download
	DownloadArtifactExecutionIDs *[]string `json:"downloadArtifactExecutionIDs,omitempty"`
}

test execution request update body

type Executions

type Executions []Execution

func (Executions) Table

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

type ExecutionsMetrics added in v1.4.26

type ExecutionsMetrics struct {
	// Percentage pass to fail ratio
	PassFailRatio float64 `json:"passFailRatio,omitempty"`
	// 50th percentile of all durations
	ExecutionDurationP50 string `json:"executionDurationP50,omitempty"`
	// 50th percentile of all durations in milliseconds
	ExecutionDurationP50ms int32 `json:"executionDurationP50ms,omitempty"`
	// 90th percentile of all durations
	ExecutionDurationP90 string `json:"executionDurationP90,omitempty"`
	// 90th percentile of all durations in milliseconds
	ExecutionDurationP90ms int32 `json:"executionDurationP90ms,omitempty"`
	// 95th percentile of all durations
	ExecutionDurationP95 string `json:"executionDurationP95,omitempty"`
	// 95th percentile of all durations in milliseconds
	ExecutionDurationP95ms int32 `json:"executionDurationP95ms,omitempty"`
	// 99th percentile of all durations
	ExecutionDurationP99 string `json:"executionDurationP99,omitempty"`
	// 99th percentile of all durations in milliseconds
	ExecutionDurationP99ms int32 `json:"executionDurationP99ms,omitempty"`
	// total executions number
	TotalExecutions int32 `json:"totalExecutions,omitempty"`
	// failed executions number
	FailedExecutions int32 `json:"failedExecutions,omitempty"`
	// List of test/testsuite executions
	Executions []ExecutionsMetricsExecutions `json:"executions,omitempty"`
}

type ExecutionsMetricsExecutions added in v1.4.26

type ExecutionsMetricsExecutions struct {
	ExecutionId string    `json:"executionId,omitempty"`
	Duration    string    `json:"duration,omitempty"`
	DurationMs  int32     `json:"durationMs,omitempty"`
	Status      string    `json:"status,omitempty"`
	Name        string    `json:"name,omitempty"`
	StartTime   time.Time `json:"startTime,omitempty"`
}

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
	Running int32 `json:"running"`
}

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"`
	Slaves *SlavesMeta `json:"slaves,omitempty"`
	// container image pull secrets
	ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// executor image command
	Command []string `json:"command,omitempty"`
	// additional executor binary argument
	Args []string `json:"args,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"`
	// list of handled content types
	ContentTypes []string `json:"contentTypes,omitempty"`
	// Job template to launch executor
	JobTemplate string `json:"jobTemplate,omitempty"`
	// name of the template resource
	JobTemplateReference string `json:"jobTemplateReference,omitempty"`
	// executor labels
	Labels map[string]string `json:"labels,omitempty"`
	// Available executor features
	Features []string      `json:"features,omitempty"`
	Meta     *ExecutorMeta `json:"meta,omitempty"`
	// use data dir as working dir for executor
	UseDataDirAsWorkingDir bool `json:"useDataDirAsWorkingDir,omitempty"`
}

CRD based executor data

func (*Executor) QuoteExecutorTextFields added in v1.8.19

func (e *Executor) QuoteExecutorTextFields()

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 ExecutorMeta added in v1.9.4

type ExecutorMeta struct {
	// URI for executor icon
	IconURI string `json:"iconURI,omitempty"`
	// URI for executor docs
	DocsURI string `json:"docsURI,omitempty"`
	// executor tooltips
	Tooltips map[string]string `json:"tooltips,omitempty"`
}

Executor meta data

type ExecutorMetaUpdate added in v1.9.4

type ExecutorMetaUpdate struct {
	// URI for executor icon
	IconURI *string `json:"iconURI,omitempty"`
	// URI for executor docs
	DocsURI *string `json:"docsURI,omitempty"`
	// executor tooltips
	Tooltips *map[string]string `json:"tooltips,omitempty"`
}

Executor meta update data

func (*ExecutorMetaUpdate) IsEmpty added in v1.9.4

func (e *ExecutorMetaUpdate) IsEmpty() bool

IsEmpty check if request is empty

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"`
	// Timestamp of log
	Time time.Time `json:"time,omitempty"`
}

CRD based executor data

type ExecutorUpdateRequest added in v1.7.29

type ExecutorUpdateRequest struct {
	// object kubernetes namespace
	Namespace *string `json:"namespace,omitempty"`
	// 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"`
	Slaves *SlavesMeta `json:"slaves,omitempty"`
	// container image pull secrets
	ImagePullSecrets *[]LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// executor image command
	Command *[]string `json:"command,omitempty"`
	// additional executor binary argument
	Args *[]string `json:"args,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"`
	// list of handled content types
	ContentTypes *[]string `json:"contentTypes,omitempty"`
	// Job template to launch executor
	JobTemplate *string `json:"jobTemplate,omitempty"`
	// name of the template resource
	JobTemplateReference *string `json:"jobTemplateReference,omitempty"`
	// executor labels
	Labels *map[string]string `json:"labels,omitempty"`
	// Available executor features
	Features *[]string            `json:"features,omitempty"`
	Meta     **ExecutorMetaUpdate `json:"meta,omitempty"`
	// use data dir as working dir for executor
	UseDataDirAsWorkingDir *bool `json:"useDataDirAsWorkingDir,omitempty"`
}

executor update request body

type ExecutorUpsertRequest added in v1.6.12

type ExecutorUpsertRequest 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"`
	Slaves *SlavesMeta `json:"slaves,omitempty"`
	// container image pull secrets
	ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// executor image command
	Command []string `json:"command,omitempty"`
	// additional executor binary argument
	Args []string `json:"args,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"`
	// list of handled content types
	ContentTypes []string `json:"contentTypes,omitempty"`
	// Job template to launch executor
	JobTemplate string `json:"jobTemplate,omitempty"`
	// name of the template resource
	JobTemplateReference string `json:"jobTemplateReference,omitempty"`
	// executor labels
	Labels map[string]string `json:"labels,omitempty"`
	// Available executor features
	Features []string      `json:"features,omitempty"`
	Meta     *ExecutorMeta `json:"meta,omitempty"`
	// use data dir as working dir for executor
	UseDataDirAsWorkingDir bool `json:"useDataDirAsWorkingDir,omitempty"`
}

executor create request body

func (*ExecutorUpsertRequest) QuoteExecutorTextFields added in v1.8.19

func (e *ExecutorUpsertRequest) QuoteExecutorTextFields()

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 GitAuthType added in v1.10.21

type GitAuthType string

GitAuthType defines git auth type

const (
	// GitAuthTypeBasic for git basic auth requests
	GitAuthTypeBasic GitAuthType = "basic"
	// GitAuthTypeHeader for git header auth requests
	GitAuthTypeHeader GitAuthType = "header"
	// GitAuthTypeEmpty for git empty auth requests
	GitAuthTypeEmpty GitAuthType = ""
)

type IoK8sApimachineryPkgApisMetaV1LabelSelector added in v1.5.33

type IoK8sApimachineryPkgApisMetaV1LabelSelector struct {
	// matchExpressions is a list of label selector requirements. The requirements are ANDed.
	MatchExpressions []IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement `json:"matchExpressions,omitempty"`
	// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.
	MatchLabels map[string]string `json:"matchLabels,omitempty"`
}

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

type IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement added in v1.5.33

type IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement struct {
	// key is the label key that the selector applies to.
	Key string `json:"key"`
	// operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.
	Operator string `json:"operator"`
	// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
	Values []string `json:"values,omitempty"`
}

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

type KeyValue

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

environment variable

type LocalObjectReference added in v1.5.35

type LocalObjectReference struct {
	Name string `json:"name,omitempty"`
}

Reference to Kubernetes object

type ObjectRef added in v0.7.5

type ObjectRef struct {
	// object kubernetes namespace
	Namespace string `json:"namespace,omitempty"`
	// object name
	Name string `json:"name"`
}

type Problem

type Problem struct {
	// Type contains a URI that identifies the problem type.
	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 for purposes 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,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"`
	// git auth username for private repositories
	Username string `json:"username,omitempty"`
	// git auth token for private repositories
	Token          string     `json:"token,omitempty"`
	UsernameSecret *SecretRef `json:"usernameSecret,omitempty"`
	TokenSecret    *SecretRef `json:"tokenSecret,omitempty"`
	// secret with certificate for private repositories. Should contain one key ending with .crt such as \"mycorp.crt\", whose value is the certificate file content, suitable for git config http.sslCAInfo
	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 string `json:"authType,omitempty"`
}

repository representation for tests in git repositories

func NewGitRepository added in v0.8.8

func NewGitRepository(uri, branch string) *Repository

NewGitRepository is a constructor for new repository

func (*Repository) WithAuthType added in v1.10.21

func (r *Repository) WithAuthType(authType GitAuthType) *Repository

WithAuthType supplies auth type for repository

func (*Repository) WithCommit added in v1.3.13

func (r *Repository) WithCommit(commit string) *Repository

WithCommit supplies commit for repository

func (*Repository) WithPath added in v0.8.8

func (r *Repository) WithPath(path string) *Repository

WithPath supplies path for repository

type RepositoryParameters added in v1.7.31

type RepositoryParameters struct {
	// 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"`
	// if provided we checkout the whole repository and run test from this directory
	WorkingDir string `json:"workingDir,omitempty"`
}

repository parameters for tests in git repositories

type RepositoryUpdate added in v1.7.29

type RepositoryUpdate 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,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"`
	// git auth username for private repositories
	Username *string `json:"username,omitempty"`
	// git auth token for private repositories
	Token          *string     `json:"token,omitempty"`
	UsernameSecret **SecretRef `json:"usernameSecret,omitempty"`
	TokenSecret    **SecretRef `json:"tokenSecret,omitempty"`
	// secret with certificate for private repositories. Should contain one key ending with .crt such as \"mycorp.crt\", whose value is the certificate file content, suitable for git config http.sslCAInfo
	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 *string `json:"authType,omitempty"`
}

repository update body

func (*RepositoryUpdate) IsEmpty added in v1.8.36

func (r *RepositoryUpdate) IsEmpty() bool

IsEmpty check if update is empty

type RepositoryUpdateParameters added in v1.7.31

type RepositoryUpdateParameters struct {
	// 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"`
	// if provided we checkout the whole repository and run test from this directory
	WorkingDir *string `json:"workingDir,omitempty"`
}

repository update parameters for tests in git repositories

type RunningContext added in v1.10.4

type RunningContext struct {
	// One of possible context types
	Type_ string `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.4

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

type Secret added in v1.15.0

type Secret struct {
	// secret name
	Name string `json:"name"`
	// secret keys
	Keys []string `json:"keys,omitempty"`
}

Secret with keys

type SecretRef added in v1.1.10

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) IsEmpty added in v1.9.1

func (s *SecretRef) IsEmpty() bool

IsEmpty check if secret ref is empty

type ServerInfo added in v0.6.2

type ServerInfo struct {
	// build version
	Version string `json:"version"`
	// build commit
	Commit string `json:"commit,omitempty"`
	// server installaton namespace
	Namespace string `json:"namespace,omitempty"`
	// currently configured testkube API context
	Context string `json:"context,omitempty"`
	// cloud organization id
	OrgId string `json:"orgId,omitempty"`
	// cloud env id
	EnvId string `json:"envId,omitempty"`
	// helm chart version
	HelmchartVersion string `json:"helmchartVersion,omitempty"`
	// dashboard uri
	DashboardUri string `json:"dashboardUri,omitempty"`
}

Server information with build version, build commit etc.

type SlavesMeta added in v1.15.0

type SlavesMeta struct {
	// slave image
	Image string `json:"image"`
}

Slave data for executing tests in distributed environment

type Template added in v1.15.0

type Template struct {
	// template name for reference
	Name string `json:"name"`
	// template namespace
	Namespace string        `json:"namespace,omitempty"`
	Type_     *TemplateType `json:"type"`
	// template body to use
	Body string `json:"body"`
	// template labels
	Labels map[string]string `json:"labels,omitempty"`
}

Golang based template

type TemplateCreateRequest added in v1.15.0

type TemplateCreateRequest struct {
	// template name for reference
	Name string `json:"name"`
	// template namespace
	Namespace string        `json:"namespace,omitempty"`
	Type_     *TemplateType `json:"type"`
	// template body to use
	Body string `json:"body"`
	// template labels
	Labels map[string]string `json:"labels,omitempty"`
}

template create request body

type TemplateType added in v1.15.0

type TemplateType string

TemplateType : template type by purpose

const (
	JOB_TemplateType       TemplateType = "job"
	CONTAINER_TemplateType TemplateType = "container"
	CRONJOB_TemplateType   TemplateType = "cronjob"
	SCRAPER_TemplateType   TemplateType = "scraper"
	PVC_TemplateType       TemplateType = "pvc"
	WEBHOOK_TemplateType   TemplateType = "webhook"
)

List of TemplateType

type TemplateUpdateRequest added in v1.15.0

type TemplateUpdateRequest struct {
	// template name for reference
	Name *string `json:"name"`
	// template namespace
	Namespace *string       `json:"namespace,omitempty"`
	Type_     *TemplateType `json:"type"`
	// template body to use
	Body *string `json:"body"`
	// template labels
	Labels *map[string]string `json:"labels,omitempty"`
}

template update request body

type Templates added in v1.15.0

type Templates []Template

func (Templates) Table added in v1.15.0

func (list Templates) Table() (header []string, output [][]string)

type Test added in v0.7.5

type Test struct {
	// test name
	Name string `json:"name,omitempty"`
	// test namespace
	Namespace string `json:"namespace,omitempty"`
	// test description
	Description string `json:"description,omitempty"`
	// test type
	Type_   string       `json:"type,omitempty"`
	Content *TestContent `json:"content,omitempty"`
	// reference to test source resource
	Source  string    `json:"source,omitempty"`
	Created time.Time `json:"created,omitempty"`
	// test labels
	Labels map[string]string `json:"labels,omitempty"`
	// schedule to run test
	Schedule string `json:"schedule,omitempty"`
	// if test is offline and cannot be executed
	ReadOnly bool `json:"readOnly,omitempty"`
	// list of file paths that will be needed from uploads
	Uploads          []string          `json:"uploads,omitempty"`
	ExecutionRequest *ExecutionRequest `json:"executionRequest,omitempty"`
	Status           *TestStatus       `json:"status,omitempty"`
}

func (Test) GetObjectRef added in v0.8.4

func (t Test) GetObjectRef(namespace string) *ObjectRef

func (*Test) QuoteTestTextFields added in v1.8.1

func (test *Test) QuoteTestTextFields()

type TestContent added in v0.9.5

type TestContent struct {
	// type of sources a runner can get data from.   string: String content (e.g. Postman JSON file).   file-uri: content stored on the webserver.   git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead).   git-dir: the entire git repo or git subdirectory depending on the  repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead).   git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.
	Type_      string      `json:"type,omitempty"`
	Repository *Repository `json:"repository,omitempty"`
	// test content data as string
	Data string `json:"data,omitempty"`
	// test content
	Uri string `json:"uri,omitempty"`
}

func NewStringTestContent added in v0.9.5

func NewStringTestContent(str string) *TestContent

func (*TestContent) IsDir deprecated added in v0.9.5

func (c *TestContent) IsDir() bool

IsDir - for content fetched as dir

Deprecated: check source data

func (*TestContent) IsFile added in v0.9.5

func (c *TestContent) IsFile() bool

IsFile - for content fetched as file Deprected: check source data

type TestContentRequest added in v1.7.31

type TestContentRequest struct {
	Repository *RepositoryParameters `json:"repository,omitempty"`
}

test content request body

type TestContentType added in v0.9.5

type TestContentType string
const (
	TestContentTypeString  TestContentType = "string"
	TestContentTypeFileURI TestContentType = "file-uri"
	TestContentTypeGitFile TestContentType = "git-file"
	TestContentTypeGitDir  TestContentType = "git-dir"
	TestContentTypeGit     TestContentType = "git"
	TestContentTypeEmpty   TestContentType = ""
)

type TestContentUpdate added in v1.7.29

type TestContentUpdate struct {
	// type of sources a runner can get data from.   *string: String content (e.g. Postman JSON file).   file-uri: content stored on the webserver.   git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead).   git-dir: the entire git repo or git subdirectory depending on the  repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead).   git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.
	Type_      *string            `json:"type,omitempty"`
	Repository **RepositoryUpdate `json:"repository,omitempty"`
	// test content data as *string
	Data *string `json:"data,omitempty"`
	// test content
	Uri *string `json:"uri,omitempty"`
}

test content update body

type TestContentUpdateRequest added in v1.7.31

type TestContentUpdateRequest struct {
	Repository **RepositoryUpdateParameters `json:"repository,omitempty"`
}

test content update request body

type TestExecutionCr added in v1.14.0

type TestExecutionCr struct {
	Test             *ObjectRef             `json:"test"`
	ExecutionRequest *ExecutionRequest      `json:"executionRequest,omitempty"`
	Status           *TestExecutionStatusCr `json:"status,omitempty"`
}

type TestExecutionStatusCr added in v1.14.0

type TestExecutionStatusCr struct {
	LatestExecution *Execution `json:"latestExecution,omitempty"`
	// test execution generation
	Generation int64 `json:"generation,omitempty"`
}

test execution status

type TestSource added in v1.5.29

type TestSource struct {
	// type of sources a runner can get data from.   string: String content (e.g. Postman JSON file).   file-uri: content stored on the webserver.   git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead).   git-dir: the entire git repo or git subdirectory depending on the  repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead).   git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.
	Type_      string      `json:"type,omitempty"`
	Repository *Repository `json:"repository,omitempty"`
	// test content data as string
	Data string `json:"data,omitempty"`
	// test content
	Uri string `json:"uri,omitempty"`
	// test source name
	Name string `json:"name,omitempty"`
	// test source namespace
	Namespace string `json:"namespace,omitempty"`
	// test source labels
	Labels map[string]string `json:"labels,omitempty"`
}

Test source resource for shared test content

type TestSourceBatchRequest added in v1.6.8

type TestSourceBatchRequest struct {
	Batch []TestSourceUpsertRequest `json:"batch"`
}

Test source batch request

type TestSourceBatchResult added in v1.6.8

type TestSourceBatchResult struct {
	// created test sources
	Created []string `json:"created,omitempty"`
	// updated test sources
	Updated []string `json:"updated,omitempty"`
	// deleted test sources
	Deleted []string `json:"deleted,omitempty"`
}

Test source batch result

type TestSourceUpdate added in v1.7.29

type TestSourceUpdate struct {
	// type of sources a runner can get data from.   *string: String content (e.g. Postman JSON file).   file-uri: content stored on the webserver.   git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead).   git-dir: the entire git repo or git subdirectory depending on the  repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead).   git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.
	Type_      *string            `json:"type,omitempty"`
	Repository **RepositoryUpdate `json:"repository,omitempty"`
	// test content data as *string
	Data *string `json:"data,omitempty"`
	// test content
	Uri *string `json:"uri,omitempty"`
	// test source name
	Name *string `json:"name,omitempty"`
	// test source namespace
	Namespace *string `json:"namespace,omitempty"`
	// test source labels
	Labels *map[string]string `json:"labels,omitempty"`
}

Test source resource update for shared test content

type TestSourceUpdateRequest added in v1.7.29

type TestSourceUpdateRequest struct {
	// type of sources a runner can get data from.   *string: String content (e.g. Postman JSON file).   file-uri: content stored on the webserver.   git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead).   git-dir: the entire git repo or git subdirectory depending on the  repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead).   git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.
	Type_      *string            `json:"type,omitempty"`
	Repository **RepositoryUpdate `json:"repository,omitempty"`
	// test content data as *string
	Data *string `json:"data,omitempty"`
	// test content
	Uri *string `json:"uri,omitempty"`
	// test source name
	Name *string `json:"name,omitempty"`
	// test source namespace
	Namespace *string `json:"namespace,omitempty"`
	// test source labels
	Labels *map[string]string `json:"labels,omitempty"`
}

test source update request body

type TestSourceUpsertRequest added in v1.5.29

type TestSourceUpsertRequest struct {
	// type of sources a runner can get data from.   string: String content (e.g. Postman JSON file).   file-uri: content stored on the webserver.   git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead).   git-dir: the entire git repo or git subdirectory depending on the  repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead).   git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.
	Type_      string      `json:"type,omitempty"`
	Repository *Repository `json:"repository,omitempty"`
	// test content data as string
	Data string `json:"data,omitempty"`
	// test content
	Uri string `json:"uri,omitempty"`
	// test source name
	Name string `json:"name,omitempty"`
	// test source namespace
	Namespace string `json:"namespace,omitempty"`
	// test source labels
	Labels map[string]string `json:"labels,omitempty"`
}

test source create request body

type TestSources added in v1.5.29

type TestSources []TestSource

func (TestSources) Table added in v1.5.29

func (list TestSources) Table() (header []string, output [][]string)

type TestStatus added in v0.7.6

type TestStatus struct {
	LatestExecution *ExecutionCore `json:"latestExecution,omitempty"`
}

test status

type TestSuite added in v0.9.5

type TestSuite struct {
	Name        string `json:"name"`
	Namespace   string `json:"namespace,omitempty"`
	Description string `json:"description,omitempty"`
	// Run these batch steps before whole suite
	Before []TestSuiteBatchStep `json:"before,omitempty"`
	// Batch steps to run
	Steps []TestSuiteBatchStep `json:"steps,omitempty"`
	// Run these batch steps after whole suite
	After []TestSuiteBatchStep `json:"after,omitempty"`
	// test suite labels
	Labels map[string]string `json:"labels,omitempty"`
	// schedule to run test suite
	Schedule         string                     `json:"schedule,omitempty"`
	Repeats          int32                      `json:"repeats,omitempty"`
	Created          time.Time                  `json:"created,omitempty"`
	ExecutionRequest *TestSuiteExecutionRequest `json:"executionRequest,omitempty"`
	Status           *TestSuiteStatus           `json:"status"`
	// if test suite is offline and cannot be executed
	ReadOnly bool `json:"readOnly,omitempty"`
}

func (TestSuite) GetObjectRef added in v0.9.5

func (t TestSuite) GetObjectRef() *ObjectRef

func (TestSuite) GetTestNames added in v1.3.45

func (t TestSuite) GetTestNames() []string

GetTestNames return test names for TestSuite

func (*TestSuite) QuoteTestSuiteTextFields added in v1.8.18

func (t *TestSuite) QuoteTestSuiteTextFields()

type TestSuiteBatchStep added in v1.13.0

type TestSuiteBatchStep struct {
	StopOnFailure     bool                     `json:"stopOnFailure"`
	DownloadArtifacts *DownloadArtifactOptions `json:"downloadArtifacts,omitempty"`
	Execute           []TestSuiteStep          `json:"execute,omitempty"`
}

set of steps run in parallel

type TestSuiteBatchStepExecutionResult added in v1.13.0

type TestSuiteBatchStepExecutionResult struct {
	Step    *TestSuiteBatchStep            `json:"step,omitempty"`
	Execute []TestSuiteStepExecutionResult `json:"execute,omitempty"`
}

execution result returned from executor

type TestSuiteBatchStepExecutionSummary added in v1.13.0

type TestSuiteBatchStepExecutionSummary struct {
	Execute []TestSuiteStepExecutionSummary `json:"execute,omitempty"`
}

Test suite batch execution summary

type TestSuiteExecution added in v0.9.5

type TestSuiteExecution struct {
	// execution id
	Id string `json:"id"`
	// execution name
	Name      string                    `json:"name"`
	TestSuite *ObjectRef                `json:"testSuite"`
	Status    *TestSuiteExecutionStatus `json:"status,omitempty"`
	// Environment variables passed to executor.
	// Deprecated: use Basic Variables instead
	Envs      map[string]string   `json:"envs,omitempty"`
	Variables map[string]Variable `json:"variables,omitempty"`
	// secret uuid
	SecretUUID string `json:"secretUUID,omitempty"`
	// test start time
	StartTime time.Time `json:"startTime,omitempty"`
	// test end time
	EndTime time.Time `json:"endTime,omitempty"`
	// test duration
	Duration string `json:"duration,omitempty"`
	// test duration in ms
	DurationMs int32 `json:"durationMs,omitempty"`
	// steps execution results
	StepResults []TestSuiteStepExecutionResultV2 `json:"stepResults,omitempty"`
	// batch steps execution results
	ExecuteStepResults []TestSuiteBatchStepExecutionResult `json:"executeStepResults,omitempty"`
	// test suite labels
	Labels         map[string]string `json:"labels,omitempty"`
	RunningContext *RunningContext   `json:"runningContext,omitempty"`
	// test suite execution name started the test suite execution
	TestSuiteExecutionName string `json:"testSuiteExecutionName,omitempty"`
}

Test suite executions data

func NewQueuedTestSuiteExecution added in v1.0.3

func NewQueuedTestSuiteExecution(name, namespace string) *TestSuiteExecution

func NewStartedTestSuiteExecution added in v0.9.5

func NewStartedTestSuiteExecution(testSuite TestSuite, request TestSuiteExecutionRequest) TestSuiteExecution

func (*TestSuiteExecution) CalculateDuration added in v0.9.5

func (e *TestSuiteExecution) CalculateDuration() time.Duration

func (*TestSuiteExecution) CleanStepsOutput added in v1.14.6

func (e *TestSuiteExecution) CleanStepsOutput() *TestSuiteExecution

func (*TestSuiteExecution) EscapeDots added in v1.12.12

func (e *TestSuiteExecution) EscapeDots() *TestSuiteExecution

func (TestSuiteExecution) FailedStepsCount added in v1.5.18

func (e TestSuiteExecution) FailedStepsCount() (count int)

func (*TestSuiteExecution) IsAborted added in v1.11.25

func (e *TestSuiteExecution) IsAborted() bool

func (TestSuiteExecution) IsCompleted added in v0.9.5

func (e TestSuiteExecution) IsCompleted() bool

func (*TestSuiteExecution) IsFailed added in v0.11.4

func (e *TestSuiteExecution) IsFailed() bool

func (*TestSuiteExecution) IsPassed added in v0.11.7

func (e *TestSuiteExecution) IsPassed() bool

func (*TestSuiteExecution) IsQueued added in v0.11.4

func (e *TestSuiteExecution) IsQueued() bool

func (*TestSuiteExecution) IsRunning added in v0.11.7

func (e *TestSuiteExecution) IsRunning() bool

func (*TestSuiteExecution) IsTimeout added in v1.11.25

func (e *TestSuiteExecution) IsTimeout() bool

func (*TestSuiteExecution) Stop added in v1.5.31

func (e *TestSuiteExecution) Stop()

func (TestSuiteExecution) Table added in v0.9.5

func (e TestSuiteExecution) Table() (header []string, output [][]string)

func (*TestSuiteExecution) TruncateErrorMessages added in v1.15.20

func (e *TestSuiteExecution) TruncateErrorMessages(length int) *TestSuiteExecution

func (*TestSuiteExecution) UnscapeDots added in v1.12.12

func (e *TestSuiteExecution) UnscapeDots() *TestSuiteExecution

type TestSuiteExecutionCore added in v1.8.17

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

test suite execution core

type TestSuiteExecutionCr added in v1.14.0

type TestSuiteExecutionCr struct {
	TestSuite        *ObjectRef                  `json:"testSuite"`
	ExecutionRequest *TestSuiteExecutionRequest  `json:"executionRequest,omitempty"`
	Status           *TestSuiteExecutionStatusCr `json:"status,omitempty"`
}

type TestSuiteExecutionRequest added in v0.9.5

type TestSuiteExecutionRequest struct {
	// test execution custom name
	Name string `json:"name,omitempty"`
	// test suite execution number
	Number int32 `json:"number,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"`
	// duration in seconds the test suite may be active, until its stopped
	Timeout        int32               `json:"timeout,omitempty"`
	ContentRequest *TestContentRequest `json:"contentRequest,omitempty"`
	RunningContext *RunningContext     `json:"runningContext,omitempty"`
	// job template extensions
	JobTemplate string `json:"jobTemplate,omitempty"`
	// name of the template resource
	JobTemplateReference string `json:"jobTemplateReference,omitempty"`
	// cron job template extensions
	CronJobTemplate string `json:"cronJobTemplate,omitempty"`
	// name of the template resource
	CronJobTemplateReference string `json:"cronJobTemplateReference,omitempty"`
	// scraper template extensions
	ScraperTemplate string `json:"scraperTemplate,omitempty"`
	// name of the template resource
	ScraperTemplateReference string `json:"scraperTemplateReference,omitempty"`
	// pvc template extensions
	PvcTemplate string `json:"pvcTemplate,omitempty"`
	// name of the template resource
	PvcTemplateReference string `json:"pvcTemplateReference,omitempty"`
	// number of tests run in parallel
	ConcurrencyLevel int32 `json:"concurrencyLevel,omitempty"`
	// test suite execution name started the test suite execution
	TestSuiteExecutionName string `json:"testSuiteExecutionName,omitempty"`
}

test suite execution request body

type TestSuiteExecutionStatus added in v0.9.5

type TestSuiteExecutionStatus string
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

func TestSuiteExecutionStatusPtr added in v0.9.5

func TestSuiteExecutionStatusPtr(status TestSuiteExecutionStatus) *TestSuiteExecutionStatus

type TestSuiteExecutionStatusCr added in v1.14.0

type TestSuiteExecutionStatusCr struct {
	LatestExecution *TestSuiteExecution `json:"latestExecution,omitempty"`
	// test suite execution generation
	Generation int64 `json:"generation,omitempty"`
}

test suite execution status

type TestSuiteExecutionStatuses added in v1.0.5

type TestSuiteExecutionStatuses []TestSuiteExecutionStatus

TestSuiteExecutionStatuses is an array of TestSuiteExecutionStatus

func ParseTestSuiteExecutionStatusList added in v1.0.5

func ParseTestSuiteExecutionStatusList(source, separator string) (statusList TestSuiteExecutionStatuses, err error)

ParseTestSuiteExecutionStatusList parse a list of test suite execution statuses from string

func (TestSuiteExecutionStatuses) ToMap added in v1.0.5

func (statuses TestSuiteExecutionStatuses) ToMap() map[TestSuiteExecutionStatus]struct{}

ToMap generates map from TestSuiteExecutionStatuses

type TestSuiteExecutionSummary added in v0.9.5

type TestSuiteExecutionSummary struct {
	// execution id
	Id string `json:"id"`
	// execution name
	Name string `json:"name"`
	// name of the test suite
	TestSuiteName string                    `json:"testSuiteName"`
	Status        *TestSuiteExecutionStatus `json:"status"`
	// test suite execution start time
	StartTime time.Time `json:"startTime,omitempty"`
	// test suite execution end time
	EndTime time.Time `json:"endTime,omitempty"`
	// test suite execution duration
	Duration string `json:"duration,omitempty"`
	// test suite execution duration in ms
	DurationMs int32                                `json:"durationMs,omitempty"`
	Execution  []TestSuiteBatchStepExecutionSummary `json:"execution,omitempty"`
	// test suite and execution labels
	Labels map[string]string `json:"labels,omitempty"`
}

Test execution summary

type TestSuiteExecutionUpdateRequest added in v1.7.29

type TestSuiteExecutionUpdateRequest struct {
	// test execution custom name
	Name *string `json:"name,omitempty"`
	// test suite execution number
	Number *int32 `json:"number,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"`
	// duration in seconds the test suite may be active, until its stopped
	Timeout        *int32                     `json:"timeout,omitempty"`
	ContentRequest **TestContentUpdateRequest `json:"contentRequest,omitempty"`
	RunningContext *RunningContext            `json:"runningContext,omitempty"`
	// job template extensions
	JobTemplate *string `json:"jobTemplate,omitempty"`
	// name of the template resource
	JobTemplateReference *string `json:"jobTemplateReference,omitempty"`
	// cron job template extensions
	CronJobTemplate *string `json:"cronJobTemplate,omitempty"`
	// name of the template resource
	CronJobTemplateReference *string `json:"cronJobTemplateReference,omitempty"`
	// scraper template extensions
	ScraperTemplate *string `json:"scraperTemplate,omitempty"`
	// name of the template resource
	ScraperTemplateReference *string `json:"scraperTemplateReference,omitempty"`
	// pvc template extensions
	PvcTemplate *string `json:"pvcTemplate,omitempty"`
	// name of the template resource
	PvcTemplateReference *string `json:"pvcTemplateReference,omitempty"`
	// number of tests run in parallel
	ConcurrencyLevel *int32 `json:"concurrencyLevel,omitempty"`
	// test suite execution name started the test suite execution
	TestSuiteExecutionName *string `json:"testSuiteExecutionName,omitempty"`
}

test suite execution update request body

type TestSuiteExecutionsResult added in v0.9.5

type TestSuiteExecutionsResult struct {
	Totals   *ExecutionsTotals           `json:"totals"`
	Filtered *ExecutionsTotals           `json:"filtered,omitempty"`
	Results  []TestSuiteExecutionSummary `json:"results"`
}

the result for a page of executions

func (TestSuiteExecutionsResult) Table added in v0.9.5

func (r TestSuiteExecutionsResult) Table() (headers []string, output [][]string)

type TestSuiteStatus added in v1.8.17

type TestSuiteStatus struct {
	LatestExecution *TestSuiteExecutionCore `json:"latestExecution,omitempty"`
}

test suite status

type TestSuiteStep added in v0.9.5

type TestSuiteStep struct {
	// object name
	Test string `json:"test,omitempty"`
	// delay duration in time units
	Delay string `json:"delay,omitempty"`
}

func (TestSuiteStep) FullName added in v0.9.5

func (s TestSuiteStep) FullName() string

func (TestSuiteStep) Type added in v0.9.5

func (s TestSuiteStep) Type() *TestSuiteStepType

type TestSuiteStepDelayV2 added in v1.13.0

type TestSuiteStepDelayV2 struct {
	// delay duration in milliseconds
	Duration int32 `json:"duration"`
}

func (TestSuiteStepDelayV2) FullName added in v1.13.0

func (s TestSuiteStepDelayV2) FullName() string

type TestSuiteStepExecuteTestV2 added in v1.13.0

type TestSuiteStepExecuteTestV2 struct {
	// object kubernetes namespace
	Namespace string `json:"namespace,omitempty"`
	// object name
	Name string `json:"name"`
}

func (TestSuiteStepExecuteTestV2) FullName added in v1.13.0

func (s TestSuiteStepExecuteTestV2) FullName() string

func (TestSuiteStepExecuteTestV2) GetObjectRef added in v1.13.0

func (s TestSuiteStepExecuteTestV2) GetObjectRef() *ObjectRef

type TestSuiteStepExecutionResult added in v0.9.5

type TestSuiteStepExecutionResult struct {
	Step      *TestSuiteStep `json:"step,omitempty"`
	Test      *ObjectRef     `json:"test,omitempty"`
	Execution *Execution     `json:"execution,omitempty"`
}

execution result returned from executor

func NewTestStepQueuedResult added in v0.8.4

func NewTestStepQueuedResult(step *TestSuiteStep) (result TestSuiteStepExecutionResult)

func (*TestSuiteStepExecutionResult) Err added in v0.9.5

func (*TestSuiteStepExecutionResult) IsAborted added in v1.6.33

func (r *TestSuiteStepExecutionResult) IsAborted() bool

func (*TestSuiteStepExecutionResult) IsFailed added in v0.9.5

func (r *TestSuiteStepExecutionResult) IsFailed() bool

type TestSuiteStepExecutionResultV2 added in v1.13.0

type TestSuiteStepExecutionResultV2 struct {
	Step      *TestSuiteStepV2 `json:"step,omitempty"`
	Test      *ObjectRef       `json:"test,omitempty"`
	Execution *Execution       `json:"execution,omitempty"`
}

execution result returned from executor

type TestSuiteStepExecutionSummary added in v0.9.5

type TestSuiteStepExecutionSummary struct {
	Id string `json:"id"`
	// execution name
	Name string `json:"name"`
	// test name
	TestName string             `json:"testName,omitempty"`
	Status   *ExecutionStatus   `json:"status"`
	Type_    *TestSuiteStepType `json:"type,omitempty"`
}

Test suite execution summary

type TestSuiteStepType added in v0.9.5

type TestSuiteStepType string
const (
	EXECUTE_TEST_TestSuiteStepType TestSuiteStepType = "executeTest"
	DELAY_TestSuiteStepType        TestSuiteStepType = "delay"
)

List of TestSuiteStepType

func TestSuiteStepTypePtr added in v0.9.5

func TestSuiteStepTypePtr(stepType TestSuiteStepType) *TestSuiteStepType

type TestSuiteStepV2 added in v1.13.0

type TestSuiteStepV2 struct {
	StopTestOnFailure bool                        `json:"stopTestOnFailure"`
	Execute           *TestSuiteStepExecuteTestV2 `json:"execute,omitempty"`
	Delay             *TestSuiteStepDelayV2       `json:"delay,omitempty"`
}

func (TestSuiteStepV2) FullName added in v1.13.0

func (s TestSuiteStepV2) FullName() string

func (*TestSuiteStepV2) ToTestSuiteBatchStep added in v1.13.0

func (s *TestSuiteStepV2) ToTestSuiteBatchStep() *TestSuiteBatchStep

ToTestSuiteBatchStep converts to ToTestSuiteBatchStep model

func (TestSuiteStepV2) Type added in v1.13.0

type TestSuiteUpdateRequest added in v1.7.29

type TestSuiteUpdateRequest struct {
	// object kubernetes namespace
	Namespace *string `json:"namespace,omitempty"`
	// object name
	Name        *string `json:"name"`
	Description *string `json:"description,omitempty"`
	// Run these batch steps before whole suite
	Before *[]TestSuiteBatchStep `json:"before,omitempty"`
	// Batch steps to run
	Steps *[]TestSuiteBatchStep `json:"steps,omitempty"`
	// Run these batch steps after whole suite
	After *[]TestSuiteBatchStep `json:"after,omitempty"`
	// test suite labels
	Labels *map[string]string `json:"labels,omitempty"`
	// schedule to run test suite
	Schedule         *string                           `json:"schedule,omitempty"`
	Repeats          *int32                            `json:"repeats,omitempty"`
	Created          time.Time                         `json:"created,omitempty"`
	ExecutionRequest **TestSuiteExecutionUpdateRequest `json:"executionRequest,omitempty"`
	Status           *TestSuiteStatus                  `json:"status"`
	// if test suite is offline and cannot be executed
	ReadOnly *bool `json:"readOnly,omitempty"`
}

test suite update body

type TestSuiteUpdateRequestV2 added in v1.13.0

type TestSuiteUpdateRequestV2 struct {
	// object kubernetes namespace
	Namespace *string `json:"namespace,omitempty"`
	// object name
	Name        *string `json:"name"`
	Description *string `json:"description,omitempty"`
	// Run this step before whole suite
	Before *[]TestSuiteStepV2 `json:"before,omitempty"`
	// Steps to run
	Steps *[]TestSuiteStepV2 `json:"steps,omitempty"`
	// Run this step after whole suite
	After *[]TestSuiteStepV2 `json:"after,omitempty"`
	// test suite labels
	Labels *map[string]string `json:"labels,omitempty"`
	// schedule to run test suite
	Schedule         *string                           `json:"schedule,omitempty"`
	Repeats          *int32                            `json:"repeats,omitempty"`
	Created          time.Time                         `json:"created,omitempty"`
	ExecutionRequest **TestSuiteExecutionUpdateRequest `json:"executionRequest,omitempty"`
	Status           *TestSuiteStatus                  `json:"status"`
}

test suite update body

func (*TestSuiteUpdateRequestV2) ToTestSuiteUpdateRequest added in v1.13.0

func (t *TestSuiteUpdateRequestV2) ToTestSuiteUpdateRequest() *TestSuiteUpdateRequest

ToTestSuiteUpdateRequest converts to TestSuiteUpdateRequest model

type TestSuiteUpsertRequest added in v0.9.5

type TestSuiteUpsertRequest struct {
	// object kubernetes namespace
	Namespace string `json:"namespace"`
	// object name
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	// Run these batch steps before whole suite
	Before []TestSuiteBatchStep `json:"before,omitempty"`
	// Batch steps to run
	Steps []TestSuiteBatchStep `json:"steps,omitempty"`
	// Run these batch steps after whole suite
	After []TestSuiteBatchStep `json:"after,omitempty"`
	// test suite labels
	Labels map[string]string `json:"labels,omitempty"`
	// schedule to run test suite
	Schedule         string                     `json:"schedule,omitempty"`
	Repeats          int32                      `json:"repeats,omitempty"`
	Created          time.Time                  `json:"created,omitempty"`
	ExecutionRequest *TestSuiteExecutionRequest `json:"executionRequest,omitempty"`
	Status           *TestSuiteStatus           `json:"status"`
	// if test suite is offline and cannot be executed
	ReadOnly bool `json:"readOnly,omitempty"`
}

test suite create request body

func (*TestSuiteUpsertRequest) QuoteTestSuiteTextFields added in v1.8.18

func (testSuite *TestSuiteUpsertRequest) QuoteTestSuiteTextFields()

type TestSuiteUpsertRequestV2 added in v1.13.0

type TestSuiteUpsertRequestV2 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 []TestSuiteStepV2 `json:"before,omitempty"`
	// Steps to run
	Steps []TestSuiteStepV2 `json:"steps,omitempty"`
	// Run this step after whole suite
	After []TestSuiteStepV2 `json:"after,omitempty"`
	// test suite labels
	Labels map[string]string `json:"labels,omitempty"`
	// schedule to run test suite
	Schedule         string                     `json:"schedule,omitempty"`
	Repeats          int32                      `json:"repeats,omitempty"`
	Created          time.Time                  `json:"created,omitempty"`
	ExecutionRequest *TestSuiteExecutionRequest `json:"executionRequest,omitempty"`
	Status           *TestSuiteStatus           `json:"status"`
}

test suite create request body

func (*TestSuiteUpsertRequestV2) ToTestSuiteUpsertRequest added in v1.13.0

func (t *TestSuiteUpsertRequestV2) ToTestSuiteUpsertRequest() *TestSuiteUpsertRequest

ToTestSuiteUpsertRequest converts to TestSuiteUpsertRequest model

type TestSuiteV2 added in v1.13.0

type TestSuiteV2 struct {
	Name        string `json:"name"`
	Namespace   string `json:"namespace,omitempty"`
	Description string `json:"description,omitempty"`
	// Run this step before whole suite
	Before []TestSuiteStepV2 `json:"before,omitempty"`
	// Steps to run
	Steps []TestSuiteStepV2 `json:"steps,omitempty"`
	// Run this step after whole suite
	After []TestSuiteStepV2 `json:"after,omitempty"`
	// test suite labels
	Labels map[string]string `json:"labels,omitempty"`
	// schedule to run test suite
	Schedule         string                     `json:"schedule,omitempty"`
	Repeats          int32                      `json:"repeats,omitempty"`
	Created          time.Time                  `json:"created,omitempty"`
	ExecutionRequest *TestSuiteExecutionRequest `json:"executionRequest,omitempty"`
	Status           *TestSuiteStatus           `json:"status"`
}

type TestSuiteWithExecution added in v0.11.6

type TestSuiteWithExecution struct {
	TestSuite       *TestSuite          `json:"testSuite"`
	LatestExecution *TestSuiteExecution `json:"latestExecution,omitempty"`
}

Test suite with latest execution result

type TestSuiteWithExecutionSummaries added in v1.7.7

type TestSuiteWithExecutionSummaries []TestSuiteWithExecutionSummary

func (TestSuiteWithExecutionSummaries) Table added in v1.7.7

func (testSutes TestSuiteWithExecutionSummaries) Table() (header []string, output [][]string)

type TestSuiteWithExecutionSummary added in v1.7.6

type TestSuiteWithExecutionSummary struct {
	TestSuite       *TestSuite                 `json:"testSuite"`
	LatestExecution *TestSuiteExecutionSummary `json:"latestExecution,omitempty"`
}

Test suite with latest execution result

func (TestSuiteWithExecutionSummary) GetObjectRef added in v1.7.7

func (t TestSuiteWithExecutionSummary) GetObjectRef() *ObjectRef

type TestSuites added in v0.9.5

type TestSuites []TestSuite

func (TestSuites) Table added in v0.9.5

func (tests TestSuites) Table() (header []string, output [][]string)

type TestTrigger added in v1.5.33

type TestTrigger struct {
	// test trigger name
	Name string `json:"name,omitempty"`
	// test trigger namespace
	Namespace string `json:"namespace,omitempty"`
	// test trigger labels
	Labels           map[string]string     `json:"labels,omitempty"`
	Resource         *TestTriggerResources `json:"resource"`
	ResourceSelector *TestTriggerSelector  `json:"resourceSelector"`
	// listen for event for selected resource
	Event             string                          `json:"event"`
	ConditionSpec     *TestTriggerConditionSpec       `json:"conditionSpec,omitempty"`
	ProbeSpec         *TestTriggerProbeSpec           `json:"probeSpec,omitempty"`
	Action            *TestTriggerActions             `json:"action"`
	Execution         *TestTriggerExecutions          `json:"execution"`
	TestSelector      *TestTriggerSelector            `json:"testSelector"`
	ConcurrencyPolicy *TestTriggerConcurrencyPolicies `json:"concurrencyPolicy,omitempty"`
}

type TestTriggerActions added in v1.5.33

type TestTriggerActions string

TestTriggerActions : supported actions for test triggers

const (
	RUN_TestTriggerActions TestTriggerActions = "run"
)

List of TestTriggerActions

type TestTriggerConcurrencyPolicies added in v1.15.0

type TestTriggerConcurrencyPolicies string

TestTriggerConcurrencyPolicies : supported concurrency policies for test triggers

const (
	ALLOW_TestTriggerConcurrencyPolicies   TestTriggerConcurrencyPolicies = "allow"
	FORBID_TestTriggerConcurrencyPolicies  TestTriggerConcurrencyPolicies = "forbid"
	REPLACE_TestTriggerConcurrencyPolicies TestTriggerConcurrencyPolicies = "replace"
)

List of TestTriggerConcurrencyPolicies

type TestTriggerCondition added in v1.8.23

type TestTriggerCondition struct {
	Status *TestTriggerConditionStatuses `json:"status"`
	// test trigger condition
	Type_ string `json:"type"`
	// test trigger condition reason
	Reason string `json:"reason,omitempty"`
	// duration in seconds in the past from current time when the condition is still valid
	Ttl int32 `json:"ttl,omitempty"`
}

supported condition for test triggers

type TestTriggerConditionSpec added in v1.8.23

type TestTriggerConditionSpec struct {
	// list of test trigger conditions
	Conditions []TestTriggerCondition `json:"conditions,omitempty"`
	// duration in seconds the test trigger waits for conditions, until its stopped
	Timeout int32 `json:"timeout,omitempty"`
	// duration in seconds the test trigger waits between condition checks
	Delay int32 `json:"delay,omitempty"`
}

type TestTriggerConditionStatuses added in v1.8.23

type TestTriggerConditionStatuses string

TestTriggerConditionStatuses : supported kubernetes condition statuses for test triggers

const (
	TRUE_TestTriggerConditionStatuses    TestTriggerConditionStatuses = "True"
	FALSE_TestTriggerConditionStatuses   TestTriggerConditionStatuses = "False"
	UNKNOWN_TestTriggerConditionStatuses TestTriggerConditionStatuses = "Unknown"
)

List of TestTriggerConditionStatuses

type TestTriggerExecutions added in v1.5.33

type TestTriggerExecutions string

TestTriggerExecutions : supported test resources for test triggers

const (
	TEST_TestTriggerExecutions      TestTriggerExecutions = "test"
	TESTSUITE_TestTriggerExecutions TestTriggerExecutions = "testsuite"
)

List of TestTriggerExecutions

type TestTriggerKeyMap added in v1.5.33

type TestTriggerKeyMap struct {
	// list of supported values for resources
	Resources []string `json:"resources"`
	// list of supported values for actions
	Actions []string `json:"actions"`
	// list of supported values for executions
	Executions []string `json:"executions"`
	// mapping between resources and supported events
	Events map[string][]string `json:"events"`
	// list of supported values for conditions
	Conditions []string `json:"conditions,omitempty"`
	// list of supported values for concurrency policies
	ConcurrencyPolicies []string `json:"concurrencyPolicies"`
}

type TestTriggerProbe added in v1.14.0

type TestTriggerProbe struct {
	// test trigger condition probe scheme to connect to host, default is http
	Scheme string `json:"scheme,omitempty"`
	// test trigger condition probe host, default is pod ip or service name
	Host string `json:"host,omitempty"`
	// test trigger condition probe path to check, default is /
	Path string `json:"path,omitempty"`
	// test trigger condition probe port to connect
	Port int32 `json:"port,omitempty"`
	// test trigger condition probe headers to submit
	Headers map[string]string `json:"headers,omitempty"`
}

supported probe for test triggers

type TestTriggerProbeSpec added in v1.14.0

type TestTriggerProbeSpec struct {
	// list of test trigger probes
	Probes []TestTriggerProbe `json:"probes,omitempty"`
	// duration in seconds the test trigger waits for probes, until its stopped
	Timeout int32 `json:"timeout,omitempty"`
	// duration in seconds the test trigger waits between probes
	Delay int32 `json:"delay,omitempty"`
}

type TestTriggerResources added in v1.5.33

type TestTriggerResources string

TestTriggerResources : supported kubernetes resources for test triggers

const (
	POD_TestTriggerResources         TestTriggerResources = "pod"
	DEPLOYMENT_TestTriggerResources  TestTriggerResources = "deployment"
	STATEFULSET_TestTriggerResources TestTriggerResources = "statefulset"
	DAEMONSET_TestTriggerResources   TestTriggerResources = "daemonset"
	SERVICE_TestTriggerResources     TestTriggerResources = "service"
	INGRESS_TestTriggerResources     TestTriggerResources = "ingress"
	EVENT_TestTriggerResources       TestTriggerResources = "event"
	CONFIGMAP_TestTriggerResources   TestTriggerResources = "configmap"
)

List of TestTriggerResources

type TestTriggerSelector added in v1.5.33

type TestTriggerSelector struct {
	// kubernetes resource name selector
	Name string `json:"name,omitempty"`
	// kubernetes resource name regex
	NameRegex string `json:"nameRegex,omitempty"`
	// resource namespace
	Namespace     string                                       `json:"namespace,omitempty"`
	LabelSelector *IoK8sApimachineryPkgApisMetaV1LabelSelector `json:"labelSelector,omitempty"`
}

type TestTriggerUpsertRequest added in v1.5.33

type TestTriggerUpsertRequest struct {
	// object kubernetes namespace
	Namespace string `json:"namespace,omitempty"`
	// object name
	Name string `json:"name"`
	// test trigger labels
	Labels           map[string]string     `json:"labels,omitempty"`
	Resource         *TestTriggerResources `json:"resource"`
	ResourceSelector *TestTriggerSelector  `json:"resourceSelector"`
	// listen for event for selected resource
	Event             string                          `json:"event"`
	ConditionSpec     *TestTriggerConditionSpec       `json:"conditionSpec,omitempty"`
	ProbeSpec         *TestTriggerProbeSpec           `json:"probeSpec,omitempty"`
	Action            *TestTriggerActions             `json:"action"`
	Execution         *TestTriggerExecutions          `json:"execution"`
	TestSelector      *TestTriggerSelector            `json:"testSelector"`
	ConcurrencyPolicy *TestTriggerConcurrencyPolicies `json:"concurrencyPolicy,omitempty"`
}

test trigger create or update request body

type TestUpdateRequest added in v1.7.29

type TestUpdateRequest struct {
	// test name
	Name *string `json:"name,omitempty"`
	// test namespace
	Namespace *string `json:"namespace,omitempty"`
	// test description
	Description *string `json:"description,omitempty"`
	// test type
	Type_   *string             `json:"type,omitempty"`
	Content **TestContentUpdate `json:"content,omitempty"`
	// reference to test source resource
	Source  *string   `json:"source,omitempty"`
	Created time.Time `json:"created,omitempty"`
	// test labels
	Labels *map[string]string `json:"labels,omitempty"`
	// schedule to run test
	Schedule *string `json:"schedule,omitempty"`
	// if test is offline and cannot be executed
	ReadOnly *bool `json:"readOnly,omitempty"`
	// list of file paths that will be needed from uploads
	Uploads          *[]string                `json:"uploads,omitempty"`
	ExecutionRequest **ExecutionUpdateRequest `json:"executionRequest,omitempty"`
	Status           *TestStatus              `json:"status,omitempty"`
}

test update request body

type TestUpsertRequest added in v0.7.6

type TestUpsertRequest struct {
	// test name
	Name string `json:"name,omitempty"`
	// test namespace
	Namespace string `json:"namespace,omitempty"`
	// test description
	Description string `json:"description,omitempty"`
	// test type
	Type_   string       `json:"type,omitempty"`
	Content *TestContent `json:"content,omitempty"`
	// reference to test source resource
	Source  string    `json:"source,omitempty"`
	Created time.Time `json:"created,omitempty"`
	// test labels
	Labels map[string]string `json:"labels,omitempty"`
	// schedule to run test
	Schedule string `json:"schedule,omitempty"`
	// if test is offline and cannot be executed
	ReadOnly bool `json:"readOnly,omitempty"`
	// list of file paths that will be needed from uploads
	Uploads          []string          `json:"uploads,omitempty"`
	ExecutionRequest *ExecutionRequest `json:"executionRequest,omitempty"`
	Status           *TestStatus       `json:"status,omitempty"`
}

test create request body

func (*TestUpsertRequest) QuoteTestTextFields added in v1.8.1

func (test *TestUpsertRequest) QuoteTestTextFields()

type TestWithExecution added in v0.11.6

type TestWithExecution struct {
	Test            *Test      `json:"test"`
	LatestExecution *Execution `json:"latestExecution,omitempty"`
}

Test with latest Execution result

type TestWithExecutionSummaries added in v1.7.7

type TestWithExecutionSummaries []TestWithExecutionSummary

func (TestWithExecutionSummaries) Table added in v1.7.7

func (t TestWithExecutionSummaries) Table() (header []string, output [][]string)

type TestWithExecutionSummary added in v1.7.6

type TestWithExecutionSummary struct {
	Test            *Test             `json:"test"`
	LatestExecution *ExecutionSummary `json:"latestExecution,omitempty"`
}

Test with latest Execution result summary

func (TestWithExecutionSummary) GetObjectRef added in v1.7.7

func (t TestWithExecutionSummary) GetObjectRef(namespace string) *ObjectRef

type Tests added in v0.7.6

type Tests []Test

func (Tests) Table added in v0.7.6

func (t Tests) Table() (header []string, output [][]string)

type Variable added in v1.1.10

type Variable struct {
	Name         string        `json:"name,omitempty"`
	Value        string        `json:"value,omitempty"`
	Type_        *VariableType `json:"type,omitempty"`
	SecretRef    *SecretRef    `json:"secretRef,omitempty"`
	ConfigMapRef *ConfigMapRef `json:"configMapRef,omitempty"`
}

func NewBasicVariable added in v1.1.10

func NewBasicVariable(name, value string) Variable

func NewConfigMapVariableReference added in v1.9.15

func NewConfigMapVariableReference(name, configMap, key string) Variable

func NewSecretVariable added in v1.1.10

func NewSecretVariable(name, value string) Variable

func NewSecretVariableReference added in v1.5.4

func NewSecretVariableReference(name, secret, key string) Variable

func (*Variable) IsSecret added in v1.1.10

func (v *Variable) IsSecret() bool

type VariableType added in v1.1.10

type VariableType string
const (
	BASIC_VariableType  VariableType = "basic"
	SECRET_VariableType VariableType = "secret"
)

List of VariableType

func VariableTypePtr added in v1.1.10

func VariableTypePtr(stepType VariableType) *VariableType

type Variables added in v1.1.10

type Variables map[string]Variable

type Webhook added in v0.9.18

type Webhook struct {
	Name      string      `json:"name,omitempty"`
	Namespace string      `json:"namespace,omitempty"`
	Uri       string      `json:"uri"`
	Events    []EventType `json:"events"`
	// Labels to filter for tests and test suites
	Selector string `json:"selector,omitempty"`
	// will load the generated payload for notification inside the object
	PayloadObjectField string `json:"payloadObjectField,omitempty"`
	// golang based template for notification payload
	PayloadTemplate string `json:"payloadTemplate,omitempty"`
	// name of the template resource
	PayloadTemplateReference string `json:"payloadTemplateReference,omitempty"`
	// webhook headers (golang template supported)
	Headers map[string]string `json:"headers,omitempty"`
	// webhook labels
	Labels map[string]string `json:"labels,omitempty"`
}

CRD based webhook data

type WebhookCreateRequest added in v0.9.18

type WebhookCreateRequest struct {
	Name      string      `json:"name,omitempty"`
	Namespace string      `json:"namespace,omitempty"`
	Uri       string      `json:"uri"`
	Events    []EventType `json:"events"`
	// Labels to filter for tests and test suites
	Selector string `json:"selector,omitempty"`
	// will load the generated payload for notification inside the object
	PayloadObjectField string `json:"payloadObjectField,omitempty"`
	// golang based template for notification payload
	PayloadTemplate string `json:"payloadTemplate,omitempty"`
	// name of the template resource
	PayloadTemplateReference string `json:"payloadTemplateReference,omitempty"`
	// webhook headers (golang template supported)
	Headers map[string]string `json:"headers,omitempty"`
	// webhook labels
	Labels map[string]string `json:"labels,omitempty"`
}

webhook create request body

type WebhookUpdateRequest added in v1.14.0

type WebhookUpdateRequest struct {
	Name      *string      `json:"name,omitempty"`
	Namespace *string      `json:"namespace,omitempty"`
	Uri       *string      `json:"uri"`
	Events    *[]EventType `json:"events"`
	// Labels to filter for tests and test suites
	Selector *string `json:"selector,omitempty"`
	// will load the generated payload for notification inside the object
	PayloadObjectField *string `json:"payloadObjectField,omitempty"`
	// golang based template for notification payload
	PayloadTemplate *string `json:"payloadTemplate,omitempty"`
	// name of the template resource
	PayloadTemplateReference *string `json:"payloadTemplateReference,omitempty"`
	// webhook headers (golang template supported)
	Headers *map[string]string `json:"headers,omitempty"`
	// webhook labels
	Labels *map[string]string `json:"labels,omitempty"`
}

webhook update request body

type Webhooks added in v0.9.18

type Webhooks []Webhook

func (Webhooks) Table added in v0.9.18

func (list Webhooks) Table() (header []string, output [][]string)

Source Files

Jump to

Keyboard shortcuts

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