package integration
import "github.com/moby/buildkit/util/testutil/integration"
Index ¶
- Variables
- func CheckFeatureCompat(t *testing.T, sb Sandbox, features map[string]struct{}, reason ...string)
- func FormatLogs(m map[string]*bytes.Buffer) string
- func HasFeatureCompat(t *testing.T, sb Sandbox, features map[string]struct{}, reason ...string) error
- func LookupBinary(name string) error
- func NewRegistry(dir string) (url string, cl func() error, err error)
- func OfficialImages(names ...string) map[string]string
- func PrintLogs(logs map[string]*bytes.Buffer, f func(args ...interface{}))
- func Register(w Worker)
- func RootlessSupported(uid int) bool
- func Run(t *testing.T, testCases []Test, opt ...TestOpt)
- func RunCmd(cmd *exec.Cmd, logs map[string]*bytes.Buffer) error
- func SkipOnPlatform(t *testing.T, goos string)
- func StartCmd(cmd *exec.Cmd, logs map[string]*bytes.Buffer) (func() error, error)
- func UnixOrWindows[T any](unix, windows T) T
- func WaitSocket(address string, d time.Duration, cmd *exec.Cmd) error
- func WriteConfig(updaters []ConfigUpdater) (string, error)
- type Backend
- type BackendConfig
- type ConfigUpdater
- type MultiCloser
- type Sandbox
- type Test
- type TestOpt
- func WithMatrix(key string, m map[string]interface{}) TestOpt
- func WithMirroredImages(m map[string]string) TestOpt
- type TmpDirWithName
- func Tmpdir(t *testing.T, appliers ...fstest.Applier) *TmpDirWithName
- func (d *TmpDirWithName) String() string
- type Worker
Variables ¶
Functions ¶
func CheckFeatureCompat ¶
func FormatLogs ¶
func HasFeatureCompat ¶
func HasFeatureCompat(t *testing.T, sb Sandbox, features map[string]struct{}, reason ...string) error
func LookupBinary ¶
func NewRegistry ¶
func OfficialImages ¶
func PrintLogs ¶
func Register ¶
func Register(w Worker)
func RootlessSupported ¶
func Run ¶
func RunCmd ¶
func SkipOnPlatform ¶
Skips tests on platform
func StartCmd ¶
func UnixOrWindows ¶
func UnixOrWindows[T any](unix, windows T) T
Selects between two types, returns second argument if on Windows or else first argument. Typically used for selecting test cases.
func WaitSocket ¶
WaitSocket will dial a socket opened by a command passed in as cmd. On Linux this socket is typically a Unix socket, while on Windows this will be a named pipe.
func WriteConfig ¶
func WriteConfig(updaters []ConfigUpdater) (string, error)
Types ¶
type Backend ¶
type Backend interface { Address() string DockerAddress() string ContainerdAddress() string Rootless() bool NetNSDetached() bool Snapshotter() string ExtraEnv() []string Supports(feature string) bool }
Backend is the minimal interface that describes a testing backend.
type BackendConfig ¶
type BackendConfig struct { Logs map[string]*bytes.Buffer DaemonConfig []ConfigUpdater }
BackendConfig is used to configure backends created by a worker.
type ConfigUpdater ¶
type MultiCloser ¶
type MultiCloser struct {
// contains filtered or unexported fields
}
func (*MultiCloser) Append ¶
func (mc *MultiCloser) Append(f func() error)
func (*MultiCloser) F ¶
func (mc *MultiCloser) F() func() error
type Sandbox ¶
type Sandbox interface { Backend Context() context.Context Cmd(...string) *exec.Cmd Logs() map[string]*bytes.Buffer PrintLogs(*testing.T) ClearLogs() NewRegistry() (string, error) Value(string) interface{} // chosen matrix value Name() string }
type Test ¶
func TestFuncs ¶
type TestOpt ¶
type TestOpt func(*testConf)
TestOpt is an option that can be used to configure a set of integration tests.
func WithMatrix ¶
func WithMirroredImages ¶
type TmpDirWithName ¶
func Tmpdir ¶
func Tmpdir(t *testing.T, appliers ...fstest.Applier) *TmpDirWithName
func (*TmpDirWithName) String ¶
func (d *TmpDirWithName) String() string
This allows TmpDirWithName to continue being used with the `%s` 'verb' on Printf.
type Worker ¶
type Worker interface { New(context.Context, *BackendConfig) (Backend, func() error, error) Close() error Name() string Rootless() bool NetNSDetached() bool }
func List ¶
func List() []Worker
Source Files ¶
frombinary.go pins.go registry.go run.go run_unix.go sandbox.go util.go util_unix.go
- Version
- v0.18.0-rc2
- Published
- Nov 26, 2024
- Platform
- js/wasm
- Imports
- 37 packages
- Last checked
- 2 minutes ago –
Tools for package owners.