runner

package
v3.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPortAllocator = NewPortAllocator(10000, 65535)

DefaultPortAllocator is a package-level default allocator Used when no custom allocator is provided

Functions

This section is empty.

Types

type ColumnInfo

type ColumnInfo struct {
	Field      string         `json:"Field"`
	Type       string         `json:"Type"`
	Collation  sql.NullString `json:"Collation"`
	Null       string         `json:"Null"`
	Key        string         `json:"Key"`
	Default    sql.NullString `json:"Default"`
	Extra      string         `json:"Extra"`
	Privileges string         `json:"Privileges"`
	Comment    string         `json:"Comment"`
}

ColumnInfo represents a single column from SHOW FULL FIELDS

type PortAllocator

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

PortAllocator manages dynamic port allocation for test containers to avoid port conflicts when running multiple tests in parallel

func NewPortAllocator

func NewPortAllocator(minPort, maxPort int) *PortAllocator

NewPortAllocator creates a new port allocator with the given port range If minPort and maxPort are 0, uses default range 10000-65535

func (*PortAllocator) Allocate

func (pa *PortAllocator) Allocate() (int, error)

Allocate finds an available port and marks it as allocated Returns the port number or an error if no ports are available

func (*PortAllocator) AllocateMany

func (pa *PortAllocator) AllocateMany(count int) ([]int, error)

AllocateMany allocates multiple ports atomically Returns the allocated ports or an error if not enough ports are available

func (*PortAllocator) Release

func (pa *PortAllocator) Release(port int)

Release marks a port as no longer allocated

type SchemaCache

type SchemaCache map[string][]ColumnInfo

SchemaCache represents the cached schema for tables

type TestSuite

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

func NewTestSuite

func NewTestSuite() (*TestSuite, error)

func (*TestSuite) CleanupSharedInfrastructure

func (s *TestSuite) CleanupSharedInfrastructure(ctx context.Context)

func (*TestSuite) DiscoverServices

func (s *TestSuite) DiscoverServices() error

DiscoverServices searches for services with .linespec.yml configuration files in the current directory and subdirectories (up to 2 levels deep for performance)

func (*TestSuite) FindInitScript

func (s *TestSuite) FindInitScript() string

FindInitScript returns the init SQL path for the first MySQL service that has database.init_script explicitly configured in its .linespec.yml.

func (*TestSuite) RunTest

func (s *TestSuite) RunTest(ctx context.Context, specPath string) error

func (*TestSuite) SetupSharedInfrastructure

func (s *TestSuite) SetupSharedInfrastructure(ctx context.Context) error

Jump to

Keyboard shortcuts

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