test

package
v1.35.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.7.1

type Config interface {
	docker.Config

	TestCases() []*latestV1.TestCase
	Muted() config.Muted
}

type FullTester

type FullTester struct {
	Testers ImageTesters
	// contains filtered or unexported fields
}

FullTester should always be the ONLY implementation of the Tester interface; newly added testing implementations should implement the imageTester interface.

func (FullTester) Test

func (t FullTester) Test(ctx context.Context, out io.Writer, bRes []graph.Artifact) error

Test is the top level testing execution call. It serves as the entrypoint to all individual tests.

func (FullTester) TestDependencies

func (t FullTester) TestDependencies(ctx context.Context, artifact *latestV1.Artifact) ([]string, error)

TestDependencies returns the watch dependencies for the target artifact to the runner.

type ImageTester added in v1.22.0

type ImageTester interface {
	Test(ctx context.Context, out io.Writer, tag string) error

	TestDependencies(ctx context.Context) ([]string, error)
}

ImageTester is the lowest-level test executor in Skaffold, responsible for running a single test on a single artifact image and returning its result. Any new test type should implement this interface.

type ImageTesters added in v1.22.0

type ImageTesters map[string][]ImageTester

ImageTesters is a collection of imageTester interfaces grouped by the target image name

type Muted added in v1.7.1

type Muted interface {
	MuteTest() bool
}

type Tester

type Tester interface {
	Test(context.Context, io.Writer, []graph.Artifact) error
	TestDependencies(ctx context.Context, artifact *latestV1.Artifact) ([]string, error)
}

Tester is the top level test executor in Skaffold. A tester is really a collection of artifact-specific testers, each of which contains one or more Tester which implements a single test run.

func NewTester

func NewTester(ctx context.Context, cfg Config, imagesAreLocal func(imageName string) (bool, error)) (Tester, error)

NewTester parses the provided test cases from the Skaffold config, and returns a Tester instance with all the necessary test runners to run all specified tests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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