diff --git a/Dockerfile b/Dockerfile index 5d6e5f23e9c77..84c4eabbb458e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -119,7 +119,7 @@ RUN set -x \ go build -o /go/bin/registry-v2 github.com/docker/distribution/cmd/registry # Get the "docker-py" source so we can run their integration tests -ENV DOCKER_PY_COMMIT d39da1167975aaeb6c423b99621ecda1223477b8 +ENV DOCKER_PY_COMMIT 91985b239764fe54714fa0a93d52aa362357d251 RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT diff --git a/daemon/rename.go b/daemon/rename.go index 3d315252ae7ff..1e3cd5370cce2 100644 --- a/daemon/rename.go +++ b/daemon/rename.go @@ -20,7 +20,7 @@ func (daemon *Daemon) ContainerRename(job *engine.Job) engine.Status { container.Lock() defer container.Unlock() - if _, err := daemon.reserveName(container.ID, newName); err != nil { + if newName, err = daemon.reserveName(container.ID, newName); err != nil { return job.Errorf("Error when allocating new name: %s", err) } diff --git a/integration-cli/docker_cli_rename_test.go b/integration-cli/docker_cli_rename_test.go index 9d56a608ce21c..3aaf79522660d 100644 --- a/integration-cli/docker_cli_rename_test.go +++ b/integration-cli/docker_cli_rename_test.go @@ -35,7 +35,7 @@ func TestRenameStoppedContainer(t *testing.T) { if err != nil { t.Fatal(err) } - if name != "new_name" { + if name != "/new_name" { t.Fatal("Failed to rename container ", name) } @@ -62,7 +62,7 @@ func TestRenameRunningContainer(t *testing.T) { if err != nil { t.Fatal(err) } - if name != "new_name" { + if name != "/new_name" { t.Fatal("Failed to rename container ") } @@ -88,7 +88,7 @@ func TestRenameCheckNames(t *testing.T) { if err != nil { t.Fatal(err) } - if name != "new_name" { + if name != "/new_name" { t.Fatal("Failed to rename container ") }