From a6ebe80fc4bc1ef67e3d57ac6cb904ae0ecc9b3a Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 3 Oct 2019 14:42:29 -0700 Subject: [PATCH] Fix merge error in streaming support This was due to a local rebase error. This should also fix the test which should have caught this. Change-Id: I6533f0bc9247298b3afae50b1eb46e6f40bf9085 --- playbooks/functional-test/main.yaml | 6 +++--- zuul_registry/storage.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/playbooks/functional-test/main.yaml b/playbooks/functional-test/main.yaml index 8aa7001..11efbac 100644 --- a/playbooks/functional-test/main.yaml +++ b/playbooks/functional-test/main.yaml @@ -25,10 +25,10 @@ command: docker image ls --all --digests --no-trunc - name: Pull the test image from Docker Hub - command: docker pull registry + command: docker pull alpine - name: Tag the test image with a realistic name - command: docker tag registry localhost:9000/test/registry + command: docker tag alpine localhost:9000/test/registry - name: Log in to local registry command: docker login localhost:9000 -u testuser -p testpass @@ -41,7 +41,7 @@ command: docker rmi localhost:9000/test/registry - name: Remove the test image from the local cache - command: docker rmi registry + command: docker rmi alpine:latest - name: Clean up the local image cache command: docker image prune -f diff --git a/zuul_registry/storage.py b/zuul_registry/storage.py index bb75fe5..030b6c6 100644 --- a/zuul_registry/storage.py +++ b/zuul_registry/storage.py @@ -140,8 +140,7 @@ class Storage: return self.backend.get_object(path) def stream_blob(self, namespace, digest): - path = os.path.join(namespace, 'blobs', - self._path_from_digest(digest), 'data') + path = os.path.join(namespace, 'blobs', digest, 'data') return self.backend.stream_object(path) def start_upload(self, namespace):