Skip to content

Commit 6deb87d

Browse files
committed
fix(Registry): Improve get image manifest
Signed-off-by: James Hart <[email protected]>
1 parent e3ec79a commit 6deb87d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

ibm_container_registry/container_registry_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def get_image_manifest(self,
504504
endpoint to review images that are in the registry.
505505
:param dict headers: A `dict` containing the request headers
506506
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
507-
:rtype: DetailedResponse
507+
:rtype: DetailedResponse with `dict` result
508508
"""
509509

510510
if image is None:

test/integration/test_container_registry_v1.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ def test_get_image_manifest(self):
172172
)
173173

174174
assert get_image_manifest_response.get_status_code() == 200
175+
image_manifest = get_image_manifest_response.get_result()
176+
assert image_manifest.get("schemaVersion") == 2
175177

176178
@needscredentials
177179
def test_get_messages(self):

test/unit/test_container_registry_v1.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,11 @@ def test_get_image_manifest_all_params(self):
682682
"""
683683
# Set up mock
684684
url = self.preprocess_url(base_url + '/api/v1/images/testString/manifest')
685+
mock_response = '{"mapKey": {"anyKey": "anyValue"}}'
685686
responses.add(responses.GET,
686687
url,
688+
body=mock_response,
689+
content_type='application/json',
687690
status=200)
688691

689692
# Set up parameter values
@@ -707,8 +710,11 @@ def test_get_image_manifest_value_error(self):
707710
"""
708711
# Set up mock
709712
url = self.preprocess_url(base_url + '/api/v1/images/testString/manifest')
713+
mock_response = '{"mapKey": {"anyKey": "anyValue"}}'
710714
responses.add(responses.GET,
711715
url,
716+
body=mock_response,
717+
content_type='application/json',
712718
status=200)
713719

714720
# Set up parameter values

0 commit comments

Comments
 (0)