Documentation ¶
Index ¶
- Constants
- Variables
- func ExistDockerContainer(name string) bool
- func ExitCodeDockerContainer(name string, waitForExit bool) (int, error)
- func IsRunningDockerContainer(name string) bool
- func KillDockerContainer(name string) bool
- func LogsDockerContainer(name string) (string, error)
- func RemoveDockerContainer(name string) bool
- func StatusDockerContainer(name string) string
- func StopDockerContainer(name string) bool
- func WaitForRunningDockerContainer(name string, running bool) error
- type Versions
Constants ¶
const ( // Docker command Docker = "docker" // Image used to run containers Image = "busybox" // DebianImage is the debian image DebianImage = "debian" // FedoraImage is the fedora image FedoraImage = "fedora" // Fedora30Image is the fedora 30 image // This Fedora version is used mainly because of https://github.com/kata-containers/tests/issues/2358 Fedora30Image = "fedora:30" // StressImage is the vish/stress image StressImage = "vish/stress" // StressDockerFile is the dockerfile to build vish/stress image StressDockerFile = "src/github.com/kata-containers/tests/stress/." // VersionsPath is the path for the versions.yaml VersionsPath = "src/github.com/kata-containers/tests/versions.yaml" )
const (
// CentosImage is the centos image
CentosImage = "centos"
)
Variables ¶
var AlpineImage string
AlpineImage is the alpine image
Functions ¶
func ExistDockerContainer ¶
ExistDockerContainer returns true if any of next cases is true: - 'docker ps -a' command shows the container - the VM is running (qemu) - the proxy is running - the shim is running else false is returned
func ExitCodeDockerContainer ¶
ExitCodeDockerContainer returns the container exit code
func IsRunningDockerContainer ¶
IsRunningDockerContainer inspects a container returns true if is running
func KillDockerContainer ¶
KillDockerContainer kills a container
func LogsDockerContainer ¶
LogsDockerContainer returns the container logs
func RemoveDockerContainer ¶
RemoveDockerContainer removes a container using docker rm -f
func StatusDockerContainer ¶
StatusDockerContainer returns the container status
func StopDockerContainer ¶
StopDockerContainer stops a container
func WaitForRunningDockerContainer ¶
WaitForRunningDockerContainer verifies if a docker container is running for a certain period of time returns an error if the timeout is reached.