mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Skip some tests for E2E
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
This commit is contained in:
parent
b1fb41988d
commit
f089a1df39
8 changed files with 62 additions and 11 deletions
|
@ -27,7 +27,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAPIDockerFileRemote(c *check.C) {
|
func (s *DockerSuite) TestBuildAPIDockerFileRemote(c *check.C) {
|
||||||
testRequires(c, NotUserNamespace)
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotUserNamespace, NotE2E)
|
||||||
|
|
||||||
var testD string
|
var testD string
|
||||||
if testEnv.DaemonPlatform() == "windows" {
|
if testEnv.DaemonPlatform() == "windows" {
|
||||||
testD = `FROM busybox
|
testD = `FROM busybox
|
||||||
|
@ -57,6 +59,9 @@ RUN find /tmp/`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAPIRemoteTarballContext(c *check.C) {
|
func (s *DockerSuite) TestBuildAPIRemoteTarballContext(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
buffer := new(bytes.Buffer)
|
buffer := new(bytes.Buffer)
|
||||||
tw := tar.NewWriter(buffer)
|
tw := tar.NewWriter(buffer)
|
||||||
defer tw.Close()
|
defer tw.Close()
|
||||||
|
@ -88,6 +93,9 @@ func (s *DockerSuite) TestBuildAPIRemoteTarballContext(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAPIRemoteTarballContextWithCustomDockerfile(c *check.C) {
|
func (s *DockerSuite) TestBuildAPIRemoteTarballContextWithCustomDockerfile(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
buffer := new(bytes.Buffer)
|
buffer := new(bytes.Buffer)
|
||||||
tw := tar.NewWriter(buffer)
|
tw := tar.NewWriter(buffer)
|
||||||
defer tw.Close()
|
defer tw.Close()
|
||||||
|
@ -142,6 +150,8 @@ RUN echo 'right'
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAPILowerDockerfile(c *check.C) {
|
func (s *DockerSuite) TestBuildAPILowerDockerfile(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
git := fakegit.New(c, "repo", map[string]string{
|
git := fakegit.New(c, "repo", map[string]string{
|
||||||
"dockerfile": `FROM busybox
|
"dockerfile": `FROM busybox
|
||||||
RUN echo from dockerfile`,
|
RUN echo from dockerfile`,
|
||||||
|
@ -160,6 +170,9 @@ RUN echo from dockerfile`,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAPIBuildGitWithF(c *check.C) {
|
func (s *DockerSuite) TestBuildAPIBuildGitWithF(c *check.C) {
|
||||||
|
// E2E: Test requires go and contrib source.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
git := fakegit.New(c, "repo", map[string]string{
|
git := fakegit.New(c, "repo", map[string]string{
|
||||||
"baz": `FROM busybox
|
"baz": `FROM busybox
|
||||||
RUN echo from baz`,
|
RUN echo from baz`,
|
||||||
|
@ -181,7 +194,8 @@ RUN echo from Dockerfile`,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAPIDoubleDockerfile(c *check.C) {
|
func (s *DockerSuite) TestBuildAPIDoubleDockerfile(c *check.C) {
|
||||||
testRequires(c, UnixCli) // dockerfile overwrites Dockerfile on Windows
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, UnixCli, NotE2E) // dockerfile overwrites Dockerfile on Windows
|
||||||
git := fakegit.New(c, "repo", map[string]string{
|
git := fakegit.New(c, "repo", map[string]string{
|
||||||
"Dockerfile": `FROM busybox
|
"Dockerfile": `FROM busybox
|
||||||
RUN echo from Dockerfile`,
|
RUN echo from Dockerfile`,
|
||||||
|
@ -366,6 +380,9 @@ func (s *DockerRegistrySuite) TestBuildCopyFromForcePull(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAddRemoteNoDecompress(c *check.C) {
|
func (s *DockerSuite) TestBuildAddRemoteNoDecompress(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
buffer := new(bytes.Buffer)
|
buffer := new(bytes.Buffer)
|
||||||
tw := tar.NewWriter(buffer)
|
tw := tar.NewWriter(buffer)
|
||||||
dt := []byte("contents")
|
dt := []byte("contents")
|
||||||
|
|
|
@ -1409,6 +1409,9 @@ func (s *DockerSuite) TestPutContainerArchiveErrSymlinkInVolumeToReadOnlyRootfs(
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestContainerAPIGetContainersJSONEmpty(c *check.C) {
|
func (s *DockerSuite) TestContainerAPIGetContainersJSONEmpty(c *check.C) {
|
||||||
|
// E2E: Test assumes no other containers running.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
cli, err := client.NewEnvClient()
|
cli, err := client.NewEnvClient()
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
defer cli.Close()
|
defer cli.Close()
|
||||||
|
|
|
@ -119,7 +119,8 @@ func (s *DockerSuite) TestAPIImagesHistory(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestAPIImagesImportBadSrc(c *check.C) {
|
func (s *DockerSuite) TestAPIImagesImportBadSrc(c *check.C) {
|
||||||
testRequires(c, Network)
|
// E2E: Test runs local HTTP server.
|
||||||
|
testRequires(c, Network, NotE2E)
|
||||||
|
|
||||||
server := httptest.NewServer(http.NewServeMux())
|
server := httptest.NewServer(http.NewServeMux())
|
||||||
defer server.Close()
|
defer server.Close()
|
||||||
|
|
|
@ -173,7 +173,7 @@ func (s *DockerSuite) TestAttachDetach(c *check.C) {
|
||||||
c.Assert(running, checker.Equals, "true", check.Commentf("expected container to still be running"))
|
c.Assert(running, checker.Equals, "true", check.Commentf("expected container to still be running"))
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
dockerCmd(c, "kill", id)
|
dockerCmdWithResult("kill", id)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
@ -225,7 +225,7 @@ func (s *DockerSuite) TestAttachDetachTruncatedID(c *check.C) {
|
||||||
c.Assert(running, checker.Equals, "true", check.Commentf("expected container to still be running"))
|
c.Assert(running, checker.Equals, "true", check.Commentf("expected container to still be running"))
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
dockerCmd(c, "kill", id)
|
dockerCmdWithResult("kill", id)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
|
|
@ -368,7 +368,8 @@ ONBUILD ENTRYPOINT ["echo"]`))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildCacheAdd(c *check.C) {
|
func (s *DockerSuite) TestBuildCacheAdd(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux) // Windows doesn't have httpserver image yet
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, DaemonIsLinux, NotE2E) // Windows doesn't have httpserver image yet
|
||||||
name := "testbuildtwoimageswithadd"
|
name := "testbuildtwoimageswithadd"
|
||||||
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
||||||
"robots.txt": "hello",
|
"robots.txt": "hello",
|
||||||
|
@ -388,6 +389,9 @@ func (s *DockerSuite) TestBuildCacheAdd(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildLastModified(c *check.C) {
|
func (s *DockerSuite) TestBuildLastModified(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
// Temporary fix for #30890. TODO @jhowardmsft figure out what
|
// Temporary fix for #30890. TODO @jhowardmsft figure out what
|
||||||
// has changed in the master busybox image.
|
// has changed in the master busybox image.
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux)
|
||||||
|
@ -517,7 +521,8 @@ RUN [ $(ls -l /exists/exists_file | awk '{print $3":"$4}') = 'dockerio:dockerio'
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildCopyAddMultipleFiles(c *check.C) {
|
func (s *DockerSuite) TestBuildCopyAddMultipleFiles(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux) // Linux specific test
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, DaemonIsLinux, NotE2E) // Linux specific test
|
||||||
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
||||||
"robots.txt": "hello",
|
"robots.txt": "hello",
|
||||||
}))
|
}))
|
||||||
|
@ -632,6 +637,9 @@ RUN find "test6" "C:/test dir/test_file6"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildCopyWildcard(c *check.C) {
|
func (s *DockerSuite) TestBuildCopyWildcard(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
name := "testcopywildcard"
|
name := "testcopywildcard"
|
||||||
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
||||||
"robots.txt": "hello",
|
"robots.txt": "hello",
|
||||||
|
@ -1927,6 +1935,9 @@ func (s *DockerSuite) TestBuildAddCurrentDirWithoutCache(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAddRemoteFileWithAndWithoutCache(c *check.C) {
|
func (s *DockerSuite) TestBuildAddRemoteFileWithAndWithoutCache(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
name := "testbuildaddremotefilewithcache"
|
name := "testbuildaddremotefilewithcache"
|
||||||
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
||||||
"baz": "hello",
|
"baz": "hello",
|
||||||
|
@ -1952,6 +1963,9 @@ func (s *DockerSuite) TestBuildAddRemoteFileWithAndWithoutCache(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildAddRemoteFileMTime(c *check.C) {
|
func (s *DockerSuite) TestBuildAddRemoteFileMTime(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
name := "testbuildaddremotefilemtime"
|
name := "testbuildaddremotefilemtime"
|
||||||
name2 := name + "2"
|
name2 := name + "2"
|
||||||
name3 := name + "3"
|
name3 := name + "3"
|
||||||
|
@ -1995,6 +2009,9 @@ func (s *DockerSuite) TestBuildAddRemoteFileMTime(c *check.C) {
|
||||||
|
|
||||||
// FIXME(vdemeester) this really seems to test the same thing as before (combined)
|
// FIXME(vdemeester) this really seems to test the same thing as before (combined)
|
||||||
func (s *DockerSuite) TestBuildAddLocalAndRemoteFilesWithAndWithoutCache(c *check.C) {
|
func (s *DockerSuite) TestBuildAddLocalAndRemoteFilesWithAndWithoutCache(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
name := "testbuildaddlocalandremotefilewithcache"
|
name := "testbuildaddlocalandremotefilewithcache"
|
||||||
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{
|
||||||
"baz": "hello",
|
"baz": "hello",
|
||||||
|
@ -3095,6 +3112,9 @@ func (s *DockerSuite) TestBuildFromGitWithF(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildFromRemoteTarball(c *check.C) {
|
func (s *DockerSuite) TestBuildFromRemoteTarball(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
name := "testbuildfromremotetarball"
|
name := "testbuildfromremotetarball"
|
||||||
|
|
||||||
buffer := new(bytes.Buffer)
|
buffer := new(bytes.Buffer)
|
||||||
|
@ -3761,6 +3781,9 @@ func (s *DockerSuite) TestBuildFromMixedcaseDockerfile(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildFromURLWithF(c *check.C) {
|
func (s *DockerSuite) TestBuildFromURLWithF(c *check.C) {
|
||||||
|
// E2E: Requires built httpserver.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{"baz": `FROM busybox
|
server := fakestorage.New(c, "", fakecontext.WithFiles(map[string]string{"baz": `FROM busybox
|
||||||
RUN echo from baz
|
RUN echo from baz
|
||||||
COPY * /tmp/
|
COPY * /tmp/
|
||||||
|
|
|
@ -25,7 +25,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *check.C) {
|
func (s *DockerSuite) TestBuildResourceConstraintsAreUsed(c *check.C) {
|
||||||
testRequires(c, cpuCfsQuota)
|
// E2E: Test assumes no other containers running.
|
||||||
|
testRequires(c, cpuCfsQuota, NotE2E)
|
||||||
name := "testbuildresourceconstraints"
|
name := "testbuildresourceconstraints"
|
||||||
|
|
||||||
ctx := fakecontext.New(c, "", fakecontext.WithDockerfile(`
|
ctx := fakecontext.New(c, "", fakecontext.WithDockerfile(`
|
||||||
|
|
|
@ -289,7 +289,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkLsDefault(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestNetworkLsFormat(c *check.C) {
|
func (s *DockerSuite) TestNetworkLsFormat(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux)
|
// E2E: Test assumes only default networks.
|
||||||
|
testRequires(c, DaemonIsLinux, NotE2E)
|
||||||
out, _ := dockerCmd(c, "network", "ls", "--format", "{{.Name}}")
|
out, _ := dockerCmd(c, "network", "ls", "--format", "{{.Name}}")
|
||||||
lines := strings.Split(strings.TrimSpace(string(out)), "\n")
|
lines := strings.Split(strings.TrimSpace(string(out)), "\n")
|
||||||
|
|
||||||
|
@ -300,7 +301,8 @@ func (s *DockerSuite) TestNetworkLsFormat(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestNetworkLsFormatDefaultFormat(c *check.C) {
|
func (s *DockerSuite) TestNetworkLsFormatDefaultFormat(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux)
|
// E2E: Test assumes only default networks.
|
||||||
|
testRequires(c, DaemonIsLinux, NotE2E)
|
||||||
|
|
||||||
config := `{
|
config := `{
|
||||||
"networksFormat": "{{ .Name }} default"
|
"networksFormat": "{{ .Name }} default"
|
||||||
|
|
|
@ -519,8 +519,9 @@ func (s *DockerSuite) TestPsRightTagName(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsLinkedWithNoTrunc(c *check.C) {
|
func (s *DockerSuite) TestPsLinkedWithNoTrunc(c *check.C) {
|
||||||
|
// E2E: Test assumes no other containers.
|
||||||
// Problematic on Windows as it doesn't support links as of Jan 2016
|
// Problematic on Windows as it doesn't support links as of Jan 2016
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux, NotE2E)
|
||||||
runSleepingContainer(c, "--name=first")
|
runSleepingContainer(c, "--name=first")
|
||||||
runSleepingContainer(c, "--name=second", "--link=first:first")
|
runSleepingContainer(c, "--name=second", "--link=first:first")
|
||||||
|
|
||||||
|
@ -632,6 +633,9 @@ func (s *DockerSuite) TestPsNamesMultipleTime(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestPsFormatHeaders(c *check.C) {
|
func (s *DockerSuite) TestPsFormatHeaders(c *check.C) {
|
||||||
|
// E2E: Test assumes no other containers.
|
||||||
|
testRequires(c, NotE2E)
|
||||||
|
|
||||||
// make sure no-container "docker ps" still prints the header row
|
// make sure no-container "docker ps" still prints the header row
|
||||||
out, _ := dockerCmd(c, "ps", "--format", "table {{.ID}}")
|
out, _ := dockerCmd(c, "ps", "--format", "table {{.ID}}")
|
||||||
c.Assert(out, checker.Equals, "CONTAINER ID\n", check.Commentf(`Expected 'CONTAINER ID\n', got %v`, out))
|
c.Assert(out, checker.Equals, "CONTAINER ID\n", check.Commentf(`Expected 'CONTAINER ID\n', got %v`, out))
|
||||||
|
|
Loading…
Reference in a new issue