Add GC test for torrent info

This commit is contained in:
Joseph Schorr 2016-01-12 12:15:07 -05:00
parent ec6efa0217
commit 742f3b4fc1

View file

@ -43,6 +43,13 @@ class TestGarbageCollection(unittest.TestCase):
model.image.find_or_create_derived_storage(image, 'squash', preferred)
model.image.find_or_create_derived_storage(image, 'aci', preferred)
# Add some torrent info.
try:
model.storage.save_torrent_info(image.storage, 1, 'helloworld')
model.storage.save_torrent_info(image.storage, 2, 'helloworlds!')
except:
pass
# Add some additional placements to the image.
for location_name in ['local_eu']:
location = database.ImageStorageLocation.get(name=location_name)