pipeline

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunUnitTestsCommand

func RunUnitTestsCommand(configFile string, testFiles []string, verbose bool) int

Types

type Reporter

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

func NewReporter

func NewReporter(verbose bool) *Reporter

func (*Reporter) Failed

func (r *Reporter) Failed() bool

func (*Reporter) RecordSuiteError

func (r *Reporter) RecordSuiteError(suiteID string, err error)

func (*Reporter) RecordTestError

func (r *Reporter) RecordTestError(suiteID string, testID int, err error)

func (*Reporter) RecordTestFailure

func (r *Reporter) RecordTestFailure(suiteID string, testID, entryID int, expectedLog, actualLog TestLog)

func (*Reporter) RecordTestSuccess

func (r *Reporter) RecordTestSuccess(suiteID string, testID, entryID int, expectedLog, actualLog TestLog)

func (*Reporter) Summary

func (r *Reporter) Summary() string

type Result

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

func (*Result) Header

func (r *Result) Header() string

func (*Result) Report

func (r *Result) Report(verbose bool) string

type TestCase

type TestCase struct {
	InputLogs    []TestLog `yaml:"input_logs"`
	ExpectedLogs []TestLog `yaml:"expected_logs"`
}

func (*TestCase) Run

func (c *TestCase) Run(suiteID string, testID int, pipeline *stages.Pipeline, reporter *Reporter)

type TestLog

type TestLog struct {
	Timestamp time.Time      `yaml:"timestamp"`
	Entry     string         `yaml:"entry"`
	Labels    model.LabelSet `yaml:"labels"`
}

func (*TestLog) Equal

func (l *TestLog) Equal(other *TestLog) bool

func (*TestLog) String

func (l *TestLog) String(indent int) string

func (*TestLog) Time

func (l *TestLog) Time() time.Time

type TestSuite

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

func NewTestSuite

func NewTestSuite(testFile string) (*TestSuite, error)

func NewTestSuites

func NewTestSuites(testFiles []string) ([]*TestSuite, error)

func (*TestSuite) Run

func (s *TestSuite) Run(reporter *Reporter, pipelines map[string]*stages.Pipeline)

type TestSuiteConfig

type TestSuiteConfig struct {
	Filepath  string     `yaml:"-"`
	JobName   string     `yaml:"job_name"`
	TestCases []TestCase `yaml:"tests"`
}

func LoadTestSuiteConfig

func LoadTestSuiteConfig(file string) (*TestSuiteConfig, error)

Jump to

Keyboard shortcuts

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