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:
parent
6bbb456138
commit
102e061147
4 changed files with 22 additions and 2 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
8
integration-cli/test_vars_exec.go
Normal file
8
integration-cli/test_vars_exec.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
// +build !test_no_exec
|
||||
|
||||
package main
|
||||
|
||||
const (
|
||||
// indicates docker daemon tested supports 'docker exec'
|
||||
supportsExec = true
|
||||
)
|
8
integration-cli/test_vars_noexec.go
Normal file
8
integration-cli/test_vars_noexec.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
// +build test_no_exec
|
||||
|
||||
package main
|
||||
|
||||
const (
|
||||
// indicates docker daemon tested supports 'docker exec'
|
||||
supportsExec = false
|
||||
)
|
Loading…
Reference in a new issue