Fix issue in V1 registry code with accessing locations under HEAD
Fixes #1922
This commit is contained in:
parent
95b7b47501
commit
0b7bb6d6c6
3 changed files with 7 additions and 17 deletions
|
@ -438,6 +438,10 @@ class V1RegistryPullMixin(V1RegistryMixin):
|
|||
response = self.conduct('GET', image_prefix + 'json', auth='sig')
|
||||
self.assertEquals(image_id, response.json()['id'])
|
||||
|
||||
# Ensure we can HEAD the image layer.
|
||||
self.conduct('HEAD', image_prefix + 'layer', auth='sig')
|
||||
|
||||
# And retrieve the layer data.
|
||||
response = self.conduct('GET', image_prefix + 'layer', auth='sig')
|
||||
|
||||
# Ensure we can parse the layer bytes and that they contain the contents.
|
||||
|
@ -1145,10 +1149,10 @@ class V2RegistryTests(V2RegistryPullMixin, V2RegistryPushMixin, RegistryTestsMix
|
|||
""" Tests for V2 registry. """
|
||||
def test_numeric_tag(self):
|
||||
# Push a new repository.
|
||||
self.do_push('public', 'newrepo', 'public', 'password', tag_name='1234')
|
||||
self.do_push('public', 'new-repo', 'public', 'password', tag_name='1234')
|
||||
|
||||
# Pull the repository.
|
||||
self.do_pull('public', 'newrepo', 'public', 'password', manifest_id='1234')
|
||||
self.do_pull('public', 'new-repo', 'public', 'password', manifest_id='1234')
|
||||
|
||||
def test_label_invalid_manifest(self):
|
||||
images = [{
|
||||
|
|
Reference in a new issue