workspace

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Dir       string   `yaml:"dir,omitempty"`
	BaseFile  string   `yaml:"base_file,omitempty"`
	TestFiles []string `yaml:"test_files,omitempty"`
}

type Workspace

type Workspace struct {
	Fragments       []*fragment.Fragment
	RegressionState *snapshot.RegressionState
	// contains filtered or unexported fields
}

func Load

func Load(cfg *config.LitmusConfig, logger logrus.FieldLogger) (*Workspace, error)

LoadAssembledWorkspace loads and assembles a workspace from config.

func New

func New(cfg *config.LitmusConfig, logger logrus.FieldLogger) *Workspace

New creates a new workspace from a LitmusConfig.

func (*Workspace) Assemble

func (w *Workspace) Assemble() error

Assemble produces the complete *amconfig.Config in w.Root by reading the workspace and merging every child fragment under <dir>/fragments.

When w.Logger is non-nil, Assemble emits structured debug entries describing each child as it is merged, plus a final summary. Errors include the offending fragment's directory for fast diagnosis.

func (*Workspace) Config

func (w *Workspace) Config() (*amconfig.Config, error)

func (*Workspace) ConfigString

func (w *Workspace) ConfigString() string

func (*Workspace) EnsureRegressionState

func (w *Workspace) EnsureRegressionState() error

EnsureRegressionState ensures the regression state is loaded into the workspace.

func (*Workspace) SaveRegressionState

func (w *Workspace) SaveRegressionState(state *snapshot.RegressionState) error

SaveRegressionState writes the regression state (ID + tests) to regressions.litmus.yml.

func (*Workspace) Templates added in v0.2.1

func (w *Workspace) Templates() (map[string]string, error)

Templates validates and loads template files referenced in the config. It checks for file existence and validates Go template syntax.

func (*Workspace) Tests

func (w *Workspace) Tests() []*types.TestCase

Tests returns all behavioral test cases from all loaded fragments.

Jump to

Keyboard shortcuts

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