mirror of
https://github.com/clearlinux/docker.git
synced 2026-06-16 02:35:49 +00: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:
@@ -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
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// +build !test_no_exec
|
||||
|
||||
package main
|
||||
|
||||
const (
|
||||
// indicates docker daemon tested supports 'docker exec'
|
||||
supportsExec = true
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
// +build test_no_exec
|
||||
|
||||
package main
|
||||
|
||||
const (
|
||||
// indicates docker daemon tested supports 'docker exec'
|
||||
supportsExec = false
|
||||
)
|
||||
Reference in New Issue
Block a user