tests

package module
v0.0.0-...-40ee2d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

README

Tests
=====

Clear Containers Tests Repository

Functional tests
----------------

In order to run all functional test you have to install next packages

- github.com/onsi/ginkgo/ginkgo
- github.com/onsi/gomega

To install above packages, just run::

  $ go get github.com/onsi/ginkgo/ginkgo
  $ go get github.com/onsi/gomega

and add ``$GOPATH/bin`` to the ``$PATH``::

  $ export GOBIN=$GOPATH/bin
  $ export PATH=$PATH:$GOBIN

To run all functional tests, run::

  $ make functional

`Environment variables`_ can be used to override the paths of Clear Containers components.
For example::

  $ RUNTIME="cc-runtime" make functional

in the above example the installed version of the Runtime is used


Environment variables
---------------------

- `RUNTIME` - Path of Clear Containers Runtime, the default path is ``$GOPATH/src/github.com/clearcontainers/runtime/cc-runtime``
- `PROXY` - Path of Clear Containers Proxy, the default path is ``$GOPATH/src/github.com/clearcontainers/proxy/cc-proxy``
- `SHIM` - Path of Clear Containers Shim, the default path is ``$GOPATH/src/github.com/clearcontainers/shim/cc-shim``
- `TIMEOUT` - Time limit in seconds for each test, the default timeout is ``5``

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Proxy string

Proxy is the path of Clear Containers Proxy

View Source
var Runtime string

Runtime is the path of Clear Containers Runtime

View Source
var Shim string

Shim is the path of Clear Containers Shim

View Source
var Timeout int

Timeout specifies the time limit in seconds for each test

Functions

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.

Types

type Command

type Command struct {

	// Stderr process's standard error
	Stderr bytes.Buffer

	// Stdout process's standard output
	Stdout bytes.Buffer

	// Timeout is the time limit of seconds of the command
	Timeout time.Duration

	// ExpectedExitCode is the expected exit code
	ExpectedExitCode int
	// contains filtered or unexported fields
}

Command contains the information of the command to run

func NewCommand

func NewCommand(path string, args ...string) *Command

NewCommand returns a new instance of Command

func (*Command) Run

func (c *Command) Run() int

Run runs a command returning its exit code

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL