From d0052ddc0db657aa42dd8e1be7a234efe7e22223 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Wed, 3 May 2017 22:37:55 -0700 Subject: [PATCH] fix expected output in tests Signed-off-by: Tibor Vass Upstream-commit: f47a61c42957c0a98944a0723b3807aa4d07ed8e Component: engine --- .../engine/integration-cli/docker_cli_build_test.go | 12 ++++++------ .../docker_cli_save_load_unix_test.go | 2 +- .../engine/integration-cli/docker_cli_start_test.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/engine/integration-cli/docker_cli_build_test.go b/components/engine/integration-cli/docker_cli_build_test.go index 754a0c0f05..fff95d66ef 100644 --- a/components/engine/integration-cli/docker_cli_build_test.go +++ b/components/engine/integration-cli/docker_cli_build_test.go @@ -1081,8 +1081,8 @@ func (s *DockerSuite) TestBuildWithInaccessibleFilesInContext(c *check.C) { c.Fatalf("output should've contained the string: no permission to read from but contained: %s", result.Combined()) } - if !strings.Contains(result.Combined(), "Error checking context") { - c.Fatalf("output should've contained the string: Error checking context") + if !strings.Contains(result.Combined(), "error checking context") { + c.Fatalf("output should've contained the string: error checking context") } } { @@ -1119,8 +1119,8 @@ func (s *DockerSuite) TestBuildWithInaccessibleFilesInContext(c *check.C) { c.Fatalf("output should've contained the string: can't access %s", result.Combined()) } - if !strings.Contains(result.Combined(), "Error checking context") { - c.Fatalf("output should've contained the string: Error checking context\ngot:%s", result.Combined()) + if !strings.Contains(result.Combined(), "error checking context") { + c.Fatalf("output should've contained the string: error checking context\ngot:%s", result.Combined()) } } @@ -2509,7 +2509,7 @@ func (s *DockerSuite) TestBuildDockerignoringBadExclusion(c *check.C) { build.WithFile(".dockerignore", "!\n"), )).Assert(c, icmd.Expected{ ExitCode: 1, - Err: "Error checking context: 'illegal exclusion pattern: \"!\"", + Err: "error checking context: 'illegal exclusion pattern: \"!\"", }) } @@ -3693,7 +3693,7 @@ func (s *DockerSuite) TestBuildRenamedDockerfile(c *check.C) { } cli.Docker(cli.Args("build", fmt.Sprintf("--file=%s", nonDockerfileFile), "-t", "test5", "."), cli.InDir(ctx.Dir)).Assert(c, icmd.Expected{ ExitCode: 1, - Err: fmt.Sprintf("The Dockerfile (%s) must be within the build context (.)", nonDockerfileFile), + Err: fmt.Sprintf("unable to prepare context: the Dockerfile (%s) must be within the build context", nonDockerfileFile), }) cli.Docker(cli.Args("build", "-f", filepath.Join("..", "Dockerfile"), "-t", "test6", ".."), cli.InDir(filepath.Join(ctx.Dir, "files"))).Assert(c, icmd.Expected{ diff --git a/components/engine/integration-cli/docker_cli_save_load_unix_test.go b/components/engine/integration-cli/docker_cli_save_load_unix_test.go index 0443400f50..deb0616820 100644 --- a/components/engine/integration-cli/docker_cli_save_load_unix_test.go +++ b/components/engine/integration-cli/docker_cli_save_load_unix_test.go @@ -67,7 +67,7 @@ func (s *DockerSuite) TestSaveAndLoadRepoStdout(c *check.C) { n, err := pty.Read(buf) c.Assert(err, check.IsNil) //could not read tty output - c.Assert(string(buf[:n]), checker.Contains, "Cowardly refusing", check.Commentf("help output is not being yielded")) + c.Assert(string(buf[:n]), checker.Contains, "cowardly refusing", check.Commentf("help output is not being yielded")) } func (s *DockerSuite) TestSaveAndLoadWithProgressBar(c *check.C) { diff --git a/components/engine/integration-cli/docker_cli_start_test.go b/components/engine/integration-cli/docker_cli_start_test.go index adb42820ce..2dd5fdf5fc 100644 --- a/components/engine/integration-cli/docker_cli_start_test.go +++ b/components/engine/integration-cli/docker_cli_start_test.go @@ -159,7 +159,7 @@ func (s *DockerSuite) TestStartAttachMultipleContainers(c *check.C) { // err shouldn't be nil because start will fail c.Assert(err, checker.NotNil, check.Commentf("out: %s", out)) // output does not correspond to what was expected - c.Assert(out, checker.Contains, "You cannot start and attach multiple containers at once.") + c.Assert(out, checker.Contains, "you cannot start and attach multiple containers at once") } // confirm the state of all the containers be stopped