diff --git a/test/test_gc.py b/test/test_gc.py index b5785e36c..1f0e46634 100644 --- a/test/test_gc.py +++ b/test/test_gc.py @@ -34,6 +34,17 @@ class TestGarbageColection(unittest.TestCase): for i in range(0, 2): model.find_or_create_derived_storage(image.storage, 'squash', preferred) + # Add some additional placements to the image. + for location_name in ['local_eu']: + location = database.ImageStorageLocation.get(name=location_name) + + try: + database.ImageStoragePlacement.get(location=location, storage=image.storage) + except: + continue + + database.ImageStoragePlacement.create(location=location, storage=image.storage) + return image.storage def createRepository(self, namespace=ADMIN_ACCESS_USER, name=REPO, **kwargs): diff --git a/test/testconfig.py b/test/testconfig.py index 94ef711cb..cc76ad91e 100644 --- a/test/testconfig.py +++ b/test/testconfig.py @@ -28,7 +28,7 @@ class TestConfig(DefaultConfig): DB_TRANSACTION_FACTORY = create_transaction - DISTRIBUTED_STORAGE_CONFIG = {'local_us': ['FakeStorage', {}]} + DISTRIBUTED_STORAGE_CONFIG = {'local_us': ['FakeStorage', {}], 'local_eu': ['FakeStorage', {}]} DISTRIBUTED_STORAGE_PREFERENCE = ['local_us'] BUILDLOGS_MODULE_AND_CLASS = ('test.testlogs', 'testlogs.TestBuildLogs')