Documentation
¶
Index ¶
- Constants
- Variables
- func DockerAttach(args ...string) (string, string, int)
- func DockerBuild(args ...string) (string, string, int)
- func DockerCommit(args ...string) (string, string, int)
- func DockerCp(args ...string) (string, string, int)
- func DockerCreate(args ...string) (string, string, int)
- func DockerDiff(args ...string) (string, string, int)
- func DockerExec(args ...string) (string, string, int)
- func DockerExport(args ...string) (string, string, int)
- func DockerImages(args ...string) (string, string, int)
- func DockerImport(args ...string) (string, string, int)
- func DockerInfo() (string, string, int)
- func DockerKill(args ...string) (string, string, int)
- func DockerNetwork(args ...string) (string, string, int)
- func DockerPause(args ...string) (string, string, int)
- func DockerPs(args ...string) (string, string, int)
- func DockerPull(args ...string) (string, string, int)
- func DockerRm(args ...string) (string, string, int)
- func DockerRmi(args ...string) (string, string, int)
- func DockerRun(args ...string) (string, string, int)
- func DockerRunWithPipe(stdin *bytes.Buffer, args ...string) (string, string, int)
- func DockerSearch(args ...string) (string, string, int)
- func DockerService(args ...string) (string, string, int)
- func DockerStart(args ...string) (string, string, int)
- func DockerStop(args ...string) (string, string, int)
- func DockerSwarm(args ...string) (string, string, int)
- func DockerTop(args ...string) (string, string, int)
- func DockerUnpause(args ...string) (string, string, int)
- func DockerVolume(args ...string) (string, string, int)
- func ExistDockerContainer(name string) bool
- func ExitCodeDockerContainer(name string, waitForExit bool) (int, error)
- func IsRunningDockerContainer(name string) bool
- func IsVMRunning(containerID string) bool
- func KillDockerContainer(name string) bool
- func LogIfFail(format string, args ...interface{})
- func LogsDockerContainer(name string) (string, error)
- func RandID(n int) string
- func RemoveDockerContainer(name string) bool
- func StatusDockerContainer(name string) string
- func StopDockerContainer(name string) bool
- func WaitForRunningDockerContainer(name string, running bool) error
- type Bundle
- type Command
- type Container
- func (c *Container) Delete(force bool) (string, string, int)
- func (c *Container) Exec(process Process) (string, string, int)
- func (c *Container) Exist() bool
- func (c *Container) Kill(all bool, signal interface{}) (string, string, int)
- func (c *Container) List(format string, quiet bool, all bool) (string, string, int)
- func (c *Container) RemoveOption(option string) error
- func (c *Container) Run() (string, string, int)
- func (c *Container) SetWorkload(workload []string) error
- func (c *Container) Teardown() error
- type Process
Constants ¶
const ( // Docker command Docker = "docker" // Image used to run containers Image = "busybox" // AlpineImage is the alpine image AlpineImage = "alpine" // PostgresImage is the postgres image PostgresImage = "postgres" // DebianImage is the debian image DebianImage = "debian" // FedoraImage is the fedora image FedoraImage = "fedora" )
Variables ¶
var Runtime string
Runtime is the path of Clear Containers Runtime
var Timeout int
Timeout specifies the time limit in seconds for each test
Functions ¶
func DockerAttach ¶
DockerAttach attach to a running container
func DockerBuild ¶
DockerBuild builds an image from a Dockerfile
func DockerCommit ¶
DockerCommit creates a new image from a container's changes
func DockerCreate ¶
DockerCreate creates a new container
func DockerDiff ¶
DockerDiff inspect changes to files or directories on a container’s filesystem
func DockerExec ¶
DockerExec runs a command in a running container
func DockerExport ¶
DockerExport will export a container’s filesystem as a tar archive
func DockerImages ¶
DockerImages list images
func DockerImport ¶
DockerImport imports the contents from a tarball to create a filesystem image
func DockerInfo ¶
DockerInfo displays system-wide information
func DockerKill ¶
DockerKill kills a container
func DockerNetwork ¶
DockerNetwork manages networks
func DockerPause ¶
DockerPause pauses all processes within one or more containers
func DockerPull ¶
DockerPull downloads the specific image
func DockerRunWithPipe ¶
DockerRunWithPipe runs a container with stdin
func DockerSearch ¶
DockerSearch searchs docker hub images
func DockerService ¶
DockerService manages services
func DockerStart ¶
DockerStart starts one or more stopped containers
func DockerStop ¶
DockerStop stops a container returns true on success else false
func DockerUnpause ¶
DockerUnpause unpauses all processes within one or more containers
func DockerVolume ¶
DockerVolume manages volumes
func ExistDockerContainer ¶
ExistDockerContainer returns true if any of next cases is true: - 'docker ps -a' command shows the container - the VM is running (qemu) else false is returned
func ExitCodeDockerContainer ¶
ExitCodeDockerContainer returns the container exit code
func IsRunningDockerContainer ¶
IsRunningDockerContainer inspects a container returns true if is running
func IsVMRunning ¶
IsVMRunning looks in /proc for a hypervisor process that contains the containerID in its command line
func KillDockerContainer ¶
KillDockerContainer kills a container
func LogIfFail ¶
func LogIfFail(format string, args ...interface{})
LogIfFail will output the message online if the test fails. This can be used for information that would be useful to debug a failure.
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
Types ¶
type Bundle ¶
type Bundle struct {
// Config represents the config.json
Config *spec.Spec
// Path to the bundle
Path string
}
Bundle represents the root directory where config.json and rootfs are
type Command ¶
type Command struct {
// Timeout is the time limit of seconds of the command
Timeout time.Duration
// contains filtered or unexported fields
}
Command contains the information of the command to run
func NewCommand ¶
NewCommand returns a new instance of Command
type Container ¶
type Container struct {
// Bundle contains the container information
// if nil then try to run the container without --bundle option
Bundle *Bundle
// Console pty slave path
// if nil then try to run the container without --console option
Console *string
// PidFile where process id is written
// if nil then try to run the container without --pid-file option
PidFile *string
// LogFile where debug information is written
// if nil then try to run the container without --log option
LogFile *string
// Detach allows to run the process detached from the shell
Detach bool
// ID of the container
// if nil then try to run the container without container ID
ID *string
}
Container represents a clear container
func NewContainer ¶
NewContainer returns a new Container
func (*Container) Delete ¶
Delete the container calls to delete command returning its stdout, stderr and exit code
func (*Container) Exec ¶
Exec the container calls into exec command returning its stdout, stderr and exit code
func (*Container) Exist ¶
Exist returns true if any of next cases is true: - list command shows the container - the process id specified in the pid file is running (cc-shim) - the VM is running (qemu) else false is returned
func (*Container) Kill ¶
Kill the container calls to kill command returning its stdout, stderr and exit code
func (*Container) List ¶
List the containers calls to list command returning its stdout, stderr and exit code
func (*Container) RemoveOption ¶
RemoveOption removes a specific option container will run without the specific option
func (*Container) Run ¶
Run the container calls to run command returning its stdout, stderr and exit code
func (*Container) SetWorkload ¶
SetWorkload sets a workload for the container
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
checkcommits
command
|
|
|
checkmetrics
command
Program checkmetrics compares the results from a set of Clear Containers metrics results, stored in CSV files, against a set of baseline metrics 'expectations', defined in a TOML file.
|
Program checkmetrics compares the results from a set of Clear Containers metrics results, stored in CSV files, against a set of baseline metrics 'expectations', defined in a TOML file. |
|
emailreport
command
|
|
|
fetchbranches
command
|
|
|
localCI
command
|
|
|
set_dma_latency
command
|
|
|
integration
|
|