def store_is_of_type(self, store_type): """Check store type %s""" % store_type storage = MultiDiskRepository(self.path, default_store=store_type) cluster = Cluster( name="test1", cloud_provider=None, setup_provider=None, user_key_name="key", repository=storage ) storage.save_or_update(cluster) assert os.path.exists(os.path.join(self.path, cluster.name + "." + store_type))
def store_is_of_type(self, store_type): """Check store type %s""" % store_type storage = MultiDiskRepository(self.path, default_store=store_type) cluster = Cluster(name='test1', cloud_provider=None, setup_provider=None, user_key_name='key', repository=storage) storage.save_or_update(cluster) assert os.path.exists( os.path.join(self.path, cluster.name + '.' + store_type))
def create_repository(self): return MultiDiskRepository(self.storage_path, self.storage_type)
def create_repository(self): storage_path = self.general_conf['storage_path'] storage_type = self.general_conf['storage_type'] return MultiDiskRepository(storage_path, storage_type)
def test_invalid_storage_type(self): with pytest.raises(ValueError): MultiDiskRepository('/tmp/foo', 'foo')
def test_invalid_storage_type(self): MultiDiskRepository('/tmp/foo', 'foo')