diff --git a/test/registry/registry_tests.py b/test/registry/registry_tests.py index 4dda819b7..0c40c77ea 100644 --- a/test/registry/registry_tests.py +++ b/test/registry/registry_tests.py @@ -1629,3 +1629,23 @@ def test_squashed_image_manifest_list(v22_protocol, basic_images, liveserver_ses '%s/layer.tar' % expected_image_id] assert tar.getnames() == expected_names + + +def test_verify_schema2(v22_protocol, basic_images, liveserver_session, liveserver, + app_reloader, data_model): + """ Test: Ensure that pushing of schema 2 manifests results in a pull of a schema2 manifest. """ + credentials = ('devtable', 'password') + if data_model != 'oci_model': + return + + credentials = ('devtable', 'password') + + # Push a new repository. + v22_protocol.push(liveserver_session, 'devtable', 'newrepo', 'latest', basic_images, + credentials=credentials) + + # Pull the repository to verify. + result = v22_protocol.pull(liveserver_session, 'devtable', 'newrepo', 'latest', basic_images, + credentials=credentials) + manifest = result.manifests['latest'] + assert manifest.schema_version == 2