Merge pull request #2778 from coreos-inc/gc-long-chain-test
Add a long-chain test for GC
This commit is contained in:
commit
d00c7d299c
1 changed files with 11 additions and 0 deletions
|
@ -620,3 +620,14 @@ def test_purge_repo(app):
|
|||
with patch('app.tuf_metadata_api') as mock_tuf:
|
||||
model.repository.purge_repository("ns", "repo")
|
||||
assert mock_tuf.delete_metadata.called_with("ns", "repo")
|
||||
|
||||
|
||||
def test_super_long_image_chain_gc(app, default_tag_policy):
|
||||
""" Test that a super long chain of images all gets properly GCed. """
|
||||
with assert_gc_integrity():
|
||||
images = ['i%s' % i for i in range(0, 100)]
|
||||
repository = create_repository(latest=images)
|
||||
delete_tag(repository, 'latest')
|
||||
|
||||
# Ensure the repository is now empty.
|
||||
assert_deleted(repository, *images)
|
||||
|
|
Reference in a new issue