test

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: GPL-3.0 Imports: 20 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, log logrus.FieldLogger, services types.TaskServices, configOverrides map[string]any) (types.TestRunner, error)

func LoadExternalTestConfig

func LoadExternalTestConfig(ctx context.Context, globalVars types.Variables, extTestCfg *types.ExternalTestConfig) (testConfig *types.TestConfig, testVars types.Variables, basePath, yamlSource string, err error)

LoadExternalTestConfig loads a test config from an external file, URL, or stored YAML source. Returns the test config, variables, base path, raw YAML source, and any error.

func LoadTestDescriptors

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

func LoadTestFromDB

func LoadTestFromDB(database *db.Database, runID uint64) (types.Test, error)

func ValidateTestConfig

func ValidateTestConfig(config *types.TestConfig) error

ValidateTestConfig validates a test configuration including its task configurations

func WrapDBTestRun

func WrapDBTestRun(database *db.Database, test *db.TestRun) types.Test

Types

type Descriptor

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

func NewDescriptor

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

func (*Descriptor) BasePath

func (d *Descriptor) BasePath() string

func (*Descriptor) Config

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

func (*Descriptor) Err

func (d *Descriptor) Err() error

func (*Descriptor) ID

func (d *Descriptor) ID() string

func (*Descriptor) Source

func (d *Descriptor) Source() string

func (*Descriptor) Vars

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

type Test

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

func (*Test) AbortTest

func (t *Test) AbortTest(skipCleanup bool)

func (*Test) GetTaskScheduler

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

func (*Test) GetTestVariables

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) Run

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

func (*Test) RunID

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

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