1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Fix race with TestContainerApiCommit

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2015-04-23 09:20:17 -04:00
parent 975e668722
commit 563708d78d
2 changed files with 3 additions and 5 deletions

View File

@ -625,7 +625,7 @@ func (s *DockerSuite) TestContainerApiCommit(c *check.C) {
}
id := strings.TrimSpace(string(out))
name := "testcommit"
name := "testcommit" + stringid.GenerateRandomID()
_, b, err := sockRequest("POST", "/commit?repo="+name+"&testtag=tag&container="+id, nil)
if err != nil && !strings.Contains(err.Error(), "200 OK: 201") {
c.Fatal(err)
@ -650,7 +650,7 @@ func (s *DockerSuite) TestContainerApiCommit(c *check.C) {
// sanity check, make sure the image is what we think it is
out, err = exec.Command(dockerBinary, "run", img.Id, "ls", "/test").CombinedOutput()
if err != nil {
c.Fatal(out, err)
c.Fatalf("error checking commited image: %v - %q", err, string(out))
}
}