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 Tmpdir(t *testing.T, appliers ...fstest.Applier) string
- 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 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 Windows
func StartCmd ¶
func Tmpdir ¶
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
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 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 sandbox.go util.go util_unix.go
- Version
- v0.13.0-beta3
- Published
- Jan 31, 2024
- Platform
- linux/amd64
- Imports
- 35 packages
- Last checked
- 28 minutes ago –
Tools for package owners.