test

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTest

func CreateTest(runID uint64, descriptor types.TestDescriptor, logger logrus.FieldLogger, services types.TaskServices) (types.Test, error)

func LoadExternalTestConfig added in v0.0.5

func LoadExternalTestConfig(ctx context.Context, globalVars types.Variables, extTestCfg *types.ExternalTestConfig) (*types.TestConfig, types.Variables, error)

func LoadTestDescriptors added in v0.0.4

func LoadTestDescriptors(ctx context.Context, globalVars types.Variables, localTests []*types.TestConfig, externalTests []*types.ExternalTestConfig) []types.TestDescriptor

Types

type Descriptor added in v0.0.4

type Descriptor struct {
	// contains filtered or unexported fields
}

func NewDescriptor added in v0.0.5

func NewDescriptor(testID, testSrc string, config *types.TestConfig, variables types.Variables) *Descriptor

func (*Descriptor) Config added in v0.0.4

func (d *Descriptor) Config() *types.TestConfig

func (*Descriptor) Err added in v0.0.4

func (d *Descriptor) Err() error

func (*Descriptor) ID added in v0.0.4

func (d *Descriptor) ID() string

func (*Descriptor) Source added in v0.0.4

func (d *Descriptor) Source() string

func (*Descriptor) Vars added in v0.0.6

func (d *Descriptor) Vars() types.Variables

type Metrics

type Metrics struct {
	TaskInfo     *prometheus.GaugeVec
	TestDuration *prometheus.GaugeVec
	TestResult   *prometheus.GaugeVec

	CurrentTask  *prometheus.GaugeVec
	TotalTasks   *prometheus.GaugeVec
	TaskDuration *prometheus.GaugeVec
	TestInfo     *prometheus.GaugeVec
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(namespace, testName string) Metrics

NewMetrics returns a new Metrics instance.

func (*Metrics) Register

func (m *Metrics) Register()

func (*Metrics) SetTestDuration

func (m *Metrics) SetTestDuration(duration float64)

func (*Metrics) SetTestInfo

func (m *Metrics) SetTestInfo(description string)

func (*Metrics) SetTotalTasks

func (m *Metrics) SetTotalTasks(total float64)

type Test

type Test struct {
	// contains filtered or unexported fields
}

func (*Test) AbortTest added in v0.0.4

func (t *Test) AbortTest(skipCleanup bool)

func (*Test) GetTaskScheduler

func (t *Test) GetTaskScheduler() types.TaskScheduler

func (*Test) GetTestVariables added in v0.0.4

func (t *Test) GetTestVariables() types.Variables

func (*Test) Logger

func (t *Test) Logger() logrus.FieldLogger

func (*Test) Name

func (t *Test) Name() string

func (*Test) Percent

func (t *Test) Percent() float64

func (*Test) Run

func (t *Test) Run(ctx context.Context) error

func (*Test) RunID added in v0.0.4

func (t *Test) RunID() uint64

func (*Test) StartTime

func (t *Test) StartTime() time.Time

func (*Test) Status

func (t *Test) Status() types.TestStatus

func (*Test) StopTime

func (t *Test) StopTime() time.Time

func (*Test) TestID added in v0.0.4

func (t *Test) TestID() string

func (*Test) Timeout

func (t *Test) Timeout() time.Duration

func (*Test) Validate

func (t *Test) Validate() error

Jump to

Keyboard shortcuts

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