fix expected output in tests

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass 2017-05-03 22:37:55 -07:00
parent 32915b1d0a
commit f47a61c429
3 changed files with 8 additions and 8 deletions

View file

@ -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{

View file

@ -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) {

View file

@ -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