Have registry tests run against both data models (old and new)

This commit is contained in:
Joseph Schorr 2018-11-13 11:49:33 +02:00
parent 849e613386
commit 8985d8f106
3 changed files with 27 additions and 7 deletions

View file

@ -75,10 +75,13 @@ def test_overwrite_tag(pusher, puller, basic_images, different_images, liveserve
credentials=credentials)
@pytest.mark.skipif(os.getenv('OCI_DATA_MODEL') == 'true', reason="no backfill in new model")
def test_no_tag_manifests(pusher, puller, basic_images, liveserver_session, app_reloader,
liveserver, registry_server_executor):
liveserver, registry_server_executor, data_model):
""" Test: Basic pull without manifests. """
if data_model == 'oci_model':
# Skip; OCI model doesn't have tag backfill.
return
credentials = ('devtable', 'password')
# Push a new repository.
@ -590,8 +593,12 @@ def test_expiration_label(label_value, expected_expiration, manifest_protocol, l
'application/vnd.docker.distribution.manifest.v2+json',
])
def test_unsupported_manifest_content_type(content_type, manifest_protocol, basic_images,
liveserver_session, app_reloader):
data_model, liveserver_session, app_reloader):
""" Test: Attempt to push a manifest with an unsupported media type. """
if data_model == 'oci_model':
# Skip; OCI requires the new manifest content types.
return
credentials = ('devtable', 'password')
options = ProtocolOptions()
@ -611,8 +618,12 @@ def test_unsupported_manifest_content_type(content_type, manifest_protocol, basi
[('application/vnd.foo.bar', 1)],
])
def test_unsupported_manifest_accept_headers(accept_mimetypes, manifest_protocol, basic_images,
liveserver_session, app_reloader):
data_model, liveserver_session, app_reloader):
""" Test: Attempt to push a manifest with an unsupported accept headers. """
if data_model == 'oci_model':
# Skip; OCI requires the new manifest content types.
return
credentials = ('devtable', 'password')
options = ProtocolOptions()