Documentation ¶
Index ¶
Constants ¶
This section is empty.
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 Executor implementation. Test = createSimpleExecutor() )
Functions ¶
func CompileTestConfig ¶
CompileTestConfig loads the test configuration and nested modules.
Types ¶
type Context ¶
type Context interface { GetClusterLoaderConfig() *config.ClusterLoaderConfig GetClusterFramework() *framework.Framework GetPrometheusFramework() *framework.Framework GetTestReporter() Reporter GetState() *state.State GetTemplateMappingCopy() map[string]interface{} GetTemplateProvider() *config.TemplateProvider GetFactory() tuningset.Factory GetManager() measurement.Manager GetChaosMonkey() *chaos.Monkey GetTestScenario() *api.TestScenario GetTestConfig() *api.Config SetTestConfig(*api.Config) }
Context is an interface for test context. Test context provides framework client and cluster state.
func CreateTestContext ¶
func CreateTestContext( clusterFramework *framework.Framework, prometheusFramework *framework.Framework, clusterLoaderConfig *config.ClusterLoaderConfig, testReporter Reporter, testScenario *api.TestScenario, ) (Context, *errors.ErrorList)
CreateTestContext creates the test context.
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 Executor ¶
type Executor 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 }
Executor is an interface for test executing object.
type OperationType ¶
type OperationType int
OperationType is a type of operation to be performed on an object.
type Reporter ¶
type Reporter interface { SetTestName(name string) GetNumberOfFailedTestItems() int BeginTestSuite() EndTestSuite() ReportTestStepFinish(duration time.Duration, stepName string, errList *errors.ErrorList) ReportTestStep(result *StepResult) ReportTestFinish(duration time.Duration, testConfigPath string, errList *errors.ErrorList) }
Reporter is an interface for reporting tests results.
func CreateSimpleReporter ¶
type StepResult ¶
type StepResult struct {
// contains filtered or unexported fields
}
func NewStepResult ¶
func NewStepResult(stepName string) *StepResult
func (*StepResult) AddStepError ¶
func (s *StepResult) AddStepError(errs *errors.ErrorList)
func (*StepResult) AddSubStepResult ¶
func (s *StepResult) AddSubStepResult(name string, id int, err *errors.ErrorList)
func (*StepResult) GetAllErrors ¶
func (s *StepResult) GetAllErrors() *errors.ErrorList
Click to show internal directories.
Click to hide internal directories.