1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

integration-cli: add test requirement ExecSupport

Skip tests based on remote daemon's exec support (to exclude
these tests from `make test` ran in LXC case). Makes use of
`test_no_exec` build tag passed by build scripts.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
Ahmet Alp Balkan 2015-02-20 23:24:30 -08:00
parent 6bbb456138
commit 102e061147
4 changed files with 22 additions and 2 deletions

View file

@ -231,7 +231,7 @@ func TestLinksNotStartedParentNotFail(t *testing.T) {
}
func TestLinksHostsFilesInject(t *testing.T) {
testRequires(t, SameHostDaemon)
testRequires(t, SameHostDaemon, ExecSupport)
defer deleteAllContainers()
@ -285,7 +285,7 @@ func TestLinksNetworkHostContainer(t *testing.T) {
}
func TestLinksUpdateOnRestart(t *testing.T) {
testRequires(t, SameHostDaemon)
testRequires(t, SameHostDaemon, ExecSupport)
defer deleteAllContainers()

View file

@ -21,6 +21,10 @@ var (
func() bool { return isUnixCli },
"Test requires posix utilities or functionality to run.",
}
ExecSupport = TestRequirement{
func() bool { return supportsExec },
"Test requires 'docker exec' capabilities on the tested daemon.",
}
)
// testRequires checks if the environment satisfies the requirements

View file

@ -0,0 +1,8 @@
// +build !test_no_exec
package main
const (
// indicates docker daemon tested supports 'docker exec'
supportsExec = true
)

View file

@ -0,0 +1,8 @@
// +build test_no_exec
package main
const (
// indicates docker daemon tested supports 'docker exec'
supportsExec = false
)