delmo

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssertStep

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

func (*AssertStep) Description

func (s *AssertStep) Description() string

func (*AssertStep) Execute

func (s *AssertStep) Execute(runtime Runtime, output TestOutput) error

type CLIOptions added in v0.5.0

type CLIOptions struct {
	DelmoFile         string
	DockerMachine     string
	OnlyBuildTask     bool
	ParallelExecution bool
	SkipPull          bool
	Localhost         string
	Tests             []string
	Help              bool
	Usage             func()
}

func ParseOptions added in v0.5.0

func ParseOptions(args []string) CLIOptions

type ComposeConfig

type ComposeConfig struct {
	Services map[string]ServiceConfig `yaml:"services"`
}

type Config

type Config struct {
	Suite    SuiteConfig  `yaml:"suite"`
	TaskList []TaskConfig `yaml:"tasks"`
	Tasks    Tasks        `yaml:"-"`
	Tests    []TestConfig `yaml:"tests"`
}

func LoadConfig

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

type DestroyStep

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

func (*DestroyStep) Description

func (s *DestroyStep) Description() string

func (*DestroyStep) Execute

func (s *DestroyStep) Execute(runtime Runtime, output TestOutput) error

type DockerCompose

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

func NewDockerCompose

func NewDockerCompose(composeFile, scope string) (*DockerCompose, error)

func (*DockerCompose) Build

func (d *DockerCompose) Build(services ...string) error

func (*DockerCompose) Cleanup

func (d *DockerCompose) Cleanup() error

func (*DockerCompose) DestroyServices

func (d *DockerCompose) DestroyServices(output TestOutput, name ...string) error

func (*DockerCompose) ExecuteTask

func (d *DockerCompose) ExecuteTask(prefix string, task TaskConfig, env TaskEnvironment, output TestOutput) error

func (*DockerCompose) Pull

func (d *DockerCompose) Pull() error

func (*DockerCompose) StartAll

func (d *DockerCompose) StartAll(output TestOutput) error

func (*DockerCompose) StartServices

func (d *DockerCompose) StartServices(output TestOutput, name ...string) error

func (*DockerCompose) StopAll

func (d *DockerCompose) StopAll(output TestOutput) error

func (*DockerCompose) StopServices

func (d *DockerCompose) StopServices(output TestOutput, name ...string) error

func (*DockerCompose) SystemOutput

func (d *DockerCompose) SystemOutput() ([]byte, error)

type ExecStep

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

func (*ExecStep) Description

func (s *ExecStep) Description() string

func (*ExecStep) Execute

func (s *ExecStep) Execute(runtime Runtime, output TestOutput) error

type FailStep

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

func (*FailStep) Description

func (s *FailStep) Description() string

func (*FailStep) Execute

func (s *FailStep) Execute(runtime Runtime, output TestOutput) error

type Runtime

type Runtime interface {
	StartAll(TestOutput) error
	StopAll(TestOutput) error
	StopServices(TestOutput, ...string) error
	StartServices(TestOutput, ...string) error
	DestroyServices(TestOutput, ...string) error
	SystemOutput() ([]byte, error)
	ExecuteTask(string, TaskConfig, TaskEnvironment, TestOutput) error
	Cleanup() error
}

type ServiceConfig

type ServiceConfig struct {
	Image string `yaml:"image"`
}

type SpecConfig

type SpecConfig []StepConfig

type StartStep

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

func (*StartStep) Description

func (s *StartStep) Description() string

func (*StartStep) Execute

func (s *StartStep) Execute(runtime Runtime, output TestOutput) error

type Step

type Step interface {
	Execute(Runtime, TestOutput) error
	Description() string
}

func NewAssertStep

func NewAssertStep(task TaskConfig, env TaskEnvironment) Step

func NewDestroyStep

func NewDestroyStep(config StepConfig) Step

func NewExecStep

func NewExecStep(task TaskConfig, env TaskEnvironment) Step

func NewFailStep

func NewFailStep(task TaskConfig, env TaskEnvironment) Step

func NewStartStep

func NewStartStep(config StepConfig) Step

func NewStopStep

func NewStopStep(config StepConfig) Step

func NewWaitStep

func NewWaitStep(timeout time.Duration, task TaskConfig, env TaskEnvironment) Step

type StepConfig

type StepConfig struct {
	Start   []string      `yaml:"start"`
	Stop    []string      `yaml:"stop"`
	Destroy []string      `yaml:"destroy"`
	Wait    string        `yaml:"wait"`
	Exec    []string      `yaml:"exec"`
	Assert  []string      `yaml:"assert"`
	Fail    []string      `yaml:"fail"`
	Timeout time.Duration `yaml:"timeout"`
}

type StopStep

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

func (*StopStep) Description

func (s *StopStep) Description() string

func (*StopStep) Execute

func (s *StopStep) Execute(runtime Runtime, output TestOutput) error

type Suite

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

func NewSuite

func NewSuite(options CLIOptions, config *Config, globalTaskEnvironment TaskEnvironment) (*Suite, error)

func (*Suite) Run

func (s *Suite) Run() int

type SuiteConfig

type SuiteConfig struct {
	Name          string `yaml:"name"`
	RawSystemPath string `yaml:"system"`
	System        string `yaml:"-"`
	TaskService   string `yaml:"task_service"`
}

type TaskConfig

type TaskConfig struct {
	Name    string `yaml:"name"`
	Service string
	Cmd     string `yaml:"command"`
}

type TaskEnvironment

type TaskEnvironment []string

type Tasks

type Tasks map[string]TaskConfig

type TestConfig

type TestConfig struct {
	Name          string     `yaml:"name"`
	BeforeStartup []string   `yaml:"before_startup"`
	Spec          SpecConfig `yaml:"spec"`
}

type TestOutput

type TestOutput struct {
	Stdout io.Writer
	Stderr io.Writer
}

type TestReport

type TestReport struct {
	Success bool
	Error   error
}

func NewTestReport

func NewTestReport() *TestReport

func (*TestReport) Fail

func (r *TestReport) Fail(err error)

type TestRunner

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

func NewTestRunner

func NewTestRunner(config TestConfig, tasks Tasks, globalTaskEnvironment TaskEnvironment) *TestRunner

func (*TestRunner) RunTest

func (tr *TestRunner) RunTest(runtime Runtime, out TestOutput) *TestReport

type WaitStep

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

func (*WaitStep) Description

func (s *WaitStep) Description() string

func (*WaitStep) Execute

func (s *WaitStep) Execute(runtime Runtime, output TestOutput) error

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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