Fix V1 push for layers already uploaded
This commit is contained in:
parent
79a115b01d
commit
bdae32630e
4 changed files with 35 additions and 10 deletions
|
@ -53,6 +53,27 @@ def test_empty_layer(pusher, puller, images_with_empty_layer, liveserver_session
|
|||
credentials=credentials)
|
||||
|
||||
|
||||
def test_empty_layer_push_again(pusher, puller, images_with_empty_layer, liveserver_session,
|
||||
app_reloader):
|
||||
""" Test: Push and pull of an image with an empty layer to a new repository and then push it
|
||||
again. """
|
||||
credentials = ('devtable', 'password')
|
||||
|
||||
# Push a new repository.
|
||||
pusher.push(liveserver_session, 'devtable', 'newrepo', 'latest', images_with_empty_layer,
|
||||
credentials=credentials)
|
||||
|
||||
# Pull the repository to verify.
|
||||
puller.pull(liveserver_session, 'devtable', 'newrepo', 'latest', images_with_empty_layer,
|
||||
credentials=credentials)
|
||||
|
||||
# Push to the repository again, to ensure everything is skipped properly.
|
||||
options = ProtocolOptions()
|
||||
options.skip_head_checks = True
|
||||
pusher.push(liveserver_session, 'devtable', 'newrepo', 'latest', images_with_empty_layer,
|
||||
credentials=credentials, options=options)
|
||||
|
||||
|
||||
def test_multi_layer_images_push_pull(pusher, puller, multi_layer_images, liveserver_session,
|
||||
app_reloader):
|
||||
""" Test: Basic push and pull of a multi-layered image to a new repository. """
|
||||
|
|
Reference in a new issue