Add a schema 2 push pull verification test
This commit is contained in:
parent
6207bb5e6f
commit
49ea2d1fa1
1 changed files with 20 additions and 0 deletions
|
@ -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
|
||||
|
|
Reference in a new issue