From 5dfccb9f2c31e8276bf097ef546cc69c377b5c62 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 24 Aug 2018 13:18:34 -0400 Subject: [PATCH] Update manifest test to use new registry_model --- endpoints/api/test/test_manifest.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/endpoints/api/test/test_manifest.py b/endpoints/api/test/test_manifest.py index 906ee07d2..7237ac020 100644 --- a/endpoints/api/test/test_manifest.py +++ b/endpoints/api/test/test_manifest.py @@ -1,22 +1,24 @@ -import pytest - -from data import model +from data.registry_model import registry_model from endpoints.api.manifest import RepositoryManifest from endpoints.api.test.shared import conduct_api_call from endpoints.test.shared import client_with_identity + from test.fixtures import * def test_repository_manifest(client): with client_with_identity('devtable', client) as cl: - tags = model.tag.list_repository_tags('devtable', 'simple') - digests = model.tag.get_tag_manifest_digests(tags) + repo_ref = registry_model.lookup_repository('devtable', 'simple') + tags = registry_model.list_repository_tags(repo_ref) for tag in tags: - manifest = digests[tag.id] + manifest_digest = tag.manifest_digest + if manifest_digest is None: + continue + params = { 'repository': 'devtable/simple', - 'manifestref': manifest, + 'manifestref': manifest_digest, } result = conduct_api_call(cl, RepositoryManifest, 'GET', params, None, 200).json - assert result['digest'] == manifest + assert result['digest'] == manifest_digest assert result['manifest_data'] assert result['image']