suite

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestJob

type TestJob struct {
	Name         string `yaml:"it"`
	Values       []string
	Set          map[string]interface{}
	Assertions   []*assertion.Assertion `yaml:"asserts"`
	Release      chartutil.ReleaseOptions
	Capabilities chartutil.Capabilities

	// where the test suite file located
	DefinitionFile string
	// contains filtered or unexported fields
}

TestJob definition of a test, including values and assertions

func (*TestJob) Run

func (t *TestJob) Run(
	targetChart *chart.Chart,
	cache *snapshot.Cache,
	result *TestJobResult,
) *TestJobResult

Run render the chart and validate it with assertions in TestJob

type TestJobResult

type TestJobResult struct {
	DisplayName   string
	Index         int
	Passed        bool
	ExecError     error
	AssertsResult []*assertion.AssertionResult
}

TestJobResult result return by TestJob.Run

type TestSuite

type TestSuite struct {
	Name      string `yaml:"suite"`
	Templates []string
	Tests     []*TestJob
	// where the test suite file located
	DefinitionFile string
	// contains filtered or unexported fields
}

TestSuite defines scope and templates to render and tests to run

func ParseTestSuiteFile

func ParseTestSuiteFile(suiteFilePath, chartRoute string) (*TestSuite, error)

ParseTestSuiteFile parse a suite file at path and returns TestSuite

func (*TestSuite) Run

func (s *TestSuite) Run(
	targetChart *chart.Chart,
	snapshotCache *snapshot.Cache,
	result *TestSuiteResult,
) *TestSuiteResult

Run runs all the test jobs defined in TestSuite

type TestSuiteResult

type TestSuiteResult struct {
	DisplayName      string
	FilePath         string
	Passed           bool
	ExecError        error
	TestsResult      []*TestJobResult
	SnapshotCounting struct {
		Total    uint
		Failed   uint
		Created  uint
		Vanished uint
	}
}

TestSuiteResult result return by TestSuite.Run

func (TestSuiteResult) Print

func (tsr TestSuiteResult) Print(printer *printer.Printer, verbosity int)

Jump to

Keyboard shortcuts

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