Documentation ¶
Index ¶
- Constants
- func DaemonHost() string
- type Execution
- func (e *Execution) Clean(t testingT, dockerBinary string)
- func (e *Execution) ContainerStoragePath() string
- func (e *Execution) DaemonKernelVersion() string
- func (e *Execution) DaemonKernelVersionNumeric() int
- func (e *Execution) DaemonPID() int
- func (e *Execution) DaemonPlatform() string
- func (e *Execution) DaemonStorageDriver() string
- func (e *Execution) DockerBasePath() string
- func (e *Execution) DockerBinary() string
- func (e *Execution) ExperimentalDaemon() bool
- func (e *Execution) Isolation() container.Isolation
- func (e *Execution) LocalDaemon() bool
- func (e *Execution) MinimalBaseImage() string
- func (e *Execution) ProtectImage(t testingT, images ...string)
- func (e *Execution) VolumesConfigPath() string
Constants ¶
const (
// DefaultDockerBinary is the name of the docker binary
DefaultDockerBinary = "docker"
)
Variables ¶
This section is empty.
Functions ¶
func DaemonHost ¶
func DaemonHost() string
DaemonHost return the daemon host string for this test execution
Types ¶
type Execution ¶
type Execution struct {
// contains filtered or unexported fields
}
Execution holds informations about the test execution environment.
func (*Execution) Clean ¶
Clean the environment, preserving protected objects (images, containers, ...) and removing everything else. It's meant to run after any tests so that they don't depend on each others.
func (*Execution) ContainerStoragePath ¶
ContainerStoragePath is the path where the container are stored for the testing daemon
func (*Execution) DaemonKernelVersion ¶
DaemonKernelVersion is the kernel version of the daemon as a string, as returned by an INFO call to the daemon.
func (*Execution) DaemonKernelVersionNumeric ¶
DaemonKernelVersionNumeric is the kernel version of the daemon as an integer. Mostly useful on Windows where DaemonKernelVersion holds the full string such as `10.0 14393 (14393.447.amd64fre.rs1_release_inmarket.161102-0100)`, but integration tests really only need the `14393` piece to make decisions.
func (*Execution) DaemonPlatform ¶
DaemonPlatform is held globally so that tests can make intelligent decisions on how to configure themselves according to the platform of the daemon. This is initialized in docker_utils by sending a version call to the daemon and examining the response header.
func (*Execution) DaemonStorageDriver ¶
DaemonStorageDriver is held globally so that tests can know the storage driver of the daemon. This is initialized in docker_utils by sending a version call to the daemon and examining the response header.
func (*Execution) DockerBasePath ¶
DockerBasePath is the base path of the docker folder (by default it is -/var/run/docker)
func (*Execution) DockerBinary ¶
DockerBinary returns the docker binary for this testing environment
func (*Execution) ExperimentalDaemon ¶
ExperimentalDaemon tell whether the main daemon has experimental features enabled or not
func (*Execution) LocalDaemon ¶
LocalDaemon is true if the daemon under test is on the same host as the CLI.
func (*Execution) MinimalBaseImage ¶
MinimalBaseImage is the image used for minimal builds (it depends on the platform)
func (*Execution) ProtectImage ¶
ProtectImage adds the specified image(s) to be protected in case of clean
func (*Execution) VolumesConfigPath ¶
VolumesConfigPath is the path of the volume configuration for the testing daemon