assertoor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: GPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Database config
	Database *db.DatabaseConfig `yaml:"database" json:"database"`

	// List of execution & consensus clients to use.
	Endpoints []clients.ClientConfig `yaml:"endpoints" json:"endpoints"`

	// WebServer config
	Web *web_types.WebConfig `yaml:"web" json:"web"`

	// Validator names config
	ValidatorNames *names.Config `yaml:"validatorNames" json:"validatorNames"`

	// Global variables
	GlobalVars map[string]any `yaml:"globalVars" json:"globalVars"`

	// Coordinator config
	Coordinator *CoordinatorConfig `yaml:"coordinator" json:"coordinator"`

	// AI assistant config
	AI *web_types.AIConfig `yaml:"ai" json:"ai"`

	// List of Test configurations.
	Tests []*types.TestConfig `yaml:"tests" json:"tests"`

	// List of yaml files with test configurations
	ExternalTests []*types.ExternalTestConfig `yaml:"externalTests" json:"externalTests"`
}

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig represents a sane-default configuration.

func NewConfig

func NewConfig(path string) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Coordinator

type Coordinator struct {
	// Config is the coordinator configuration.
	Config *Config
	// contains filtered or unexported fields
}

func NewCoordinator

func NewCoordinator(config *Config, log logrus.FieldLogger, metricsPort int) *Coordinator

func (*Coordinator) ClientPool

func (c *Coordinator) ClientPool() *clients.ClientPool

func (*Coordinator) Database

func (c *Coordinator) Database() *db.Database

func (*Coordinator) DeleteTestRun

func (c *Coordinator) DeleteTestRun(runID uint64) error

func (*Coordinator) EventBus

func (c *Coordinator) EventBus() *events.EventBus

func (*Coordinator) GetTestByRunID

func (c *Coordinator) GetTestByRunID(runID uint64) types.Test

func (*Coordinator) GetTestHistory

func (c *Coordinator) GetTestHistory(testID string, firstRunID, offset, limit uint64) (tests []types.Test, totalTests uint64)

func (*Coordinator) GetTestQueue

func (c *Coordinator) GetTestQueue() []types.Test

func (*Coordinator) GlobalVariables

func (c *Coordinator) GlobalVariables() types.Variables

func (*Coordinator) LogReader

func (c *Coordinator) LogReader() logger.LogReader

func (*Coordinator) Logger

func (c *Coordinator) Logger() logrus.FieldLogger

func (*Coordinator) Run

func (c *Coordinator) Run(ctx context.Context) error

Run executes the coordinator until completion.

func (*Coordinator) ScheduleTest

func (c *Coordinator) ScheduleTest(descriptor types.TestDescriptor, configOverrides map[string]any, allowDuplicate, skipQueue bool) (types.TestRunner, error)

func (*Coordinator) TestRegistry

func (c *Coordinator) TestRegistry() types.TestRegistry

func (*Coordinator) ValidatorNames

func (c *Coordinator) ValidatorNames() *names.ValidatorNames

func (*Coordinator) WalletManager

func (c *Coordinator) WalletManager() *txmgr.Spamoor

type CoordinatorConfig

type CoordinatorConfig struct {
	// Maximum number of tests executed concurrently
	MaxConcurrentTests uint64 `yaml:"maxConcurrentTests" json:"maxConcurrentTests"`

	// Test history cleanup delay
	TestRetentionTime helper.Duration `yaml:"testRetentionTime" json:"testRetentionTime"`
}

func (*CoordinatorConfig) Validate

func (c *CoordinatorConfig) Validate() error

type TestRegistry

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

func NewTestRegistry

func NewTestRegistry(coordinator types.Coordinator) *TestRegistry

func (*TestRegistry) AddExternalTest

func (c *TestRegistry) AddExternalTest(ctx context.Context, extTestCfg *types.ExternalTestConfig) (types.TestDescriptor, error)

func (*TestRegistry) AddLocalTest

func (c *TestRegistry) AddLocalTest(testConfig *types.TestConfig) (types.TestDescriptor, error)

func (*TestRegistry) AddLocalTestWithYaml

func (c *TestRegistry) AddLocalTestWithYaml(testConfig *types.TestConfig, yamlSource string) (types.TestDescriptor, error)

func (*TestRegistry) DeleteTest

func (c *TestRegistry) DeleteTest(testID string) error

func (*TestRegistry) GetTestDescriptors

func (c *TestRegistry) GetTestDescriptors() []types.TestDescriptor

func (*TestRegistry) LoadTests

func (c *TestRegistry) LoadTests(ctx context.Context, local []*types.TestConfig, external []*types.ExternalTestConfig)

type TestRunner

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

func NewTestRunner

func NewTestRunner(coordinator types.Coordinator, lastRunID uint64) *TestRunner

func (*TestRunner) GetTestByRunID

func (c *TestRunner) GetTestByRunID(runID uint64) types.Test

func (*TestRunner) GetTestQueue

func (c *TestRunner) GetTestQueue() []types.Test

func (*TestRunner) RemoveTestFromQueue

func (c *TestRunner) RemoveTestFromQueue(runID uint64) bool

func (*TestRunner) RunOffQueueTestExecutionLoop

func (c *TestRunner) RunOffQueueTestExecutionLoop(ctx context.Context)

func (*TestRunner) RunTestCleanup

func (c *TestRunner) RunTestCleanup(ctx context.Context, retentionTime time.Duration)

func (*TestRunner) RunTestExecutionLoop

func (c *TestRunner) RunTestExecutionLoop(ctx context.Context, concurrencyLimit uint64)

func (*TestRunner) RunTestScheduler

func (c *TestRunner) RunTestScheduler(ctx context.Context)

func (*TestRunner) ScheduleTest

func (c *TestRunner) ScheduleTest(descriptor types.TestDescriptor, configOverrides map[string]any, allowDuplicate, skipQueue bool) (types.TestRunner, error)

Jump to

Keyboard shortcuts

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