test

package
v0.0.0-...-0f57273 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CREATE_OBJECT is create object operation.
	CREATE_OBJECT = OperationType(0)
	// PATCH_OBJECT is update object (using patch) operation.
	// TODO(krzysied): Figure out how to implement UPDATE_OBJECT operation.
	PATCH_OBJECT = OperationType(1)
	// DELETE_OBJECT is delete object operation.
	DELETE_OBJECT = OperationType(2)
)

Variables

View Source
var (
	// CreateContext global function for creating context.
	// This function should be set by Context implementation.
	CreateContext = createSimpleContext

	// Test is a singleton for test execution object.
	// This object should be set by TestExecutor implementation.
	Test = createSimpleTestExecutor()
)

Functions

func RunTest

func RunTest(clusterFramework, prometheusFramework *framework.Framework, clusterLoaderConfig *config.ClusterLoaderConfig) *errors.ErrorList

RunTest runs test based on provided test configuration.

Types

type Context

type Context interface {
	GetClusterLoaderConfig() *config.ClusterLoaderConfig
	GetClusterFramework() *framework.Framework
	GetPrometheusFramework() *framework.Framework
	GetState() *state.State
	GetTemplateMappingCopy() map[string]interface{}
	GetTemplateProvider() *config.TemplateProvider
	GetTuningSetFactory() tuningset.TuningSetFactory
	GetMeasurementManager() measurement.MeasurementManager
	GetChaosMonkey() *chaos.Monkey
}

Context is an interface for test context. Test context provides framework client and cluster state.

type CreatContextFunc

type CreatContextFunc func(c *config.ClusterLoaderConfig, f *framework.Framework, s *state.State) Context

CreatContextFunc a type for function that creates Context based on given framework client and state.

type OperationType

type OperationType int

OperationType is a type of operation to be performed on an object.

type TestExecutor

type TestExecutor interface {
	ExecuteTest(ctx Context, conf *api.Config) *errors.ErrorList
	ExecuteStep(ctx Context, step *api.Step) *errors.ErrorList
	ExecutePhase(ctx Context, phase *api.Phase) *errors.ErrorList
	ExecuteObject(ctx Context, object *api.Object, namespace string, replicaIndex int32, operation OperationType) *errors.ErrorList
}

TestExecutor is an interface for test executing object.

Jump to

Keyboard shortcuts

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