testutil

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Dut = flag.Bool("dut", false, "run command/device under test")

Functions

func RunDUT added in v0.7.1

func RunDUT()

Types

type CommandFixtureTest added in v0.7.1

type CommandFixtureTest struct {
	Name              string
	T                 *testing.T
	Args              []string
	ExitCode          int
	NoNestedWorkspace bool
	StdoutSubs        []string
	NoStdoutSub       string
	StderrSub         string
	NoStderrSub       string
	Eval              func(t *testing.T, stdout, stderr string)
	Fixture           *Setup
	FixturePath       string
}

func (*CommandFixtureTest) Run added in v0.7.1

func (ft *CommandFixtureTest) Run()

Run executes the fixture test - do not forget to call this one

type Component

type Component struct {
	Location string            `yaml:"location"`
	Files    map[string]string `yaml:"files"`
	Comp     leeway.Component  `yaml:"comp"`
	Packages []leeway.Package  `yaml:"packages"`
	Scripts  []leeway.Script   `yaml:"scripts"`
}

type Setup

type Setup struct {
	Workspace  leeway.Workspace  `yaml:"workspace"`
	Components []Component       `yaml:"components"`
	Files      map[string]string `yaml:"files"`
}

func LoadFromYAML

func LoadFromYAML(in io.Reader) (*Setup, error)

LoadFromYAML loads a workspace setup from a YAML file

func (Setup) Materialize

func (s Setup) Materialize() (workspaceRoot string, err error)

Materialize produces a leeway workspace according to the setup spec

Jump to

Keyboard shortcuts

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