integration

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorRequirements = errors.Errorf("missing requirements")

Functions

func InitContainerdWorker added in v0.6.4

func InitContainerdWorker()

func InitOCIWorker added in v0.6.4

func InitOCIWorker()

func NewRegistry added in v0.6.4

func NewRegistry(dir string) (url string, cl func() error, err error)

func OfficialImages

func OfficialImages(names ...string) map[string]string

func Register added in v0.6.4

func Register(w Worker)

func Run

func Run(t *testing.T, testCases []Test, opt ...TestOpt)

Types

type Backend added in v0.6.4

type Backend interface {
	Address() string
	Rootless() bool
}

Backend is the minimal interface that describes a testing backend.

type BackendConfig added in v0.6.4

type BackendConfig struct {
	Logs       map[string]*bytes.Buffer
	ConfigFile string
}

BackendConfig is used to configure backends created by a worker.

type ConfigUpdater added in v0.6.4

type ConfigUpdater interface {
	UpdateConfigFile(string) string
}

type Sandbox

type Sandbox interface {
	Backend

	Cmd(...string) *exec.Cmd
	PrintLogs(*testing.T)
	NewRegistry() (string, error)
	Value(string) interface{} // chosen matrix value
}

type Test

type Test func(*testing.T, Sandbox)

type TestOpt

type TestOpt func(*testConf)

TestOpt is an option that can be used to configure a set of integration tests.

func WithMatrix

func WithMatrix(key string, m map[string]interface{}) TestOpt

func WithMirroredImages

func WithMirroredImages(m map[string]string) TestOpt

type Worker

type Worker interface {
	New(*BackendConfig) (Backend, func() error, error)
	Name() string
}

func List

func List() []Worker

Jump to

Keyboard shortcuts

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