package integration

import "github.com/moby/buildkit/util/testutil/integration"

Index

Variables

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

Functions

func InitContainerdWorker

func InitContainerdWorker()

func InitOCIWorker

func InitOCIWorker()

func NewRegistry

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

func OfficialImages

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

func Register

func Register(w Worker)

func Run

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

Types

type Backend

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

Backend is the minimal interface that describes a testing backend.

type BackendConfig

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

BackendConfig is used to configure backends created by a worker.

type ConfigUpdater

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

Source Files

containerd.go frombinary.go oci.go registry.go run.go sandbox.go util.go

Version
v0.7.0-rc1
Published
Mar 12, 2020
Platform
js/wasm
Imports
33 packages
Last checked
7 minutes ago

Tools for package owners.