Fix image replication for images with remote layers
This commit is contained in:
parent
0eb84f8077
commit
180d8847db
7 changed files with 103 additions and 40 deletions
|
@ -459,6 +459,24 @@ def test_image_replication(pusher, puller, basic_images, liveserver_session, app
|
|||
assert r.text == 'OK'
|
||||
|
||||
|
||||
def test_image_replication_empty_layers(pusher, puller, images_with_empty_layer, liveserver_session,
|
||||
app_reloader, liveserver, registry_server_executor):
|
||||
""" Test: Ensure that entries are created for replication of the images pushed. """
|
||||
credentials = ('devtable', 'password')
|
||||
|
||||
with FeatureFlagValue('STORAGE_REPLICATION', True, registry_server_executor.on(liveserver)):
|
||||
pusher.push(liveserver_session, 'devtable', 'newrepo', 'latest', images_with_empty_layer,
|
||||
credentials=credentials)
|
||||
|
||||
result = puller.pull(liveserver_session, 'devtable', 'newrepo', 'latest',
|
||||
images_with_empty_layer, credentials=credentials)
|
||||
|
||||
# Ensure that entries were created for each image.
|
||||
for image_id in result.image_ids.values():
|
||||
r = registry_server_executor.on(liveserver).get_storage_replication_entry(image_id)
|
||||
assert r.text == 'OK'
|
||||
|
||||
|
||||
@pytest.mark.parametrize('repo_name, expected_failure', [
|
||||
('something', None),
|
||||
('some/slash', Failures.SLASH_REPOSITORY),
|
||||
|
|
Reference in a new issue