"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cinder/tests/unit/test_db_api.py" between
cinder-15.0.1.tar.gz and cinder-15.1.0.tar.gz

About: OpenStack Cinder (Core Service: Block Storage) provides persistent block storage to running instances. Its pluggable driver architecture facilitates the creation and management of block storage devices.
The "Train" series (latest release).

test_db_api.py  (cinder-15.0.1):test_db_api.py  (cinder-15.1.0)
skipping to change at line 655 skipping to change at line 655
def test_volume_destroy(self, utcnow_mock): def test_volume_destroy(self, utcnow_mock):
volume = db.volume_create(self.ctxt, volume = db.volume_create(self.ctxt,
{'volume_type_id': fake.VOLUME_TYPE_ID}) {'volume_type_id': fake.VOLUME_TYPE_ID})
self.assertDictEqual( self.assertDictEqual(
{'status': 'deleted', 'deleted': True, 'deleted_at': UTC_NOW, {'status': 'deleted', 'deleted': True, 'deleted_at': UTC_NOW,
'migration_status': None}, 'migration_status': None},
db.volume_destroy(self.ctxt, volume['id'])) db.volume_destroy(self.ctxt, volume['id']))
self.assertRaises(exception.VolumeNotFound, db.volume_get, self.assertRaises(exception.VolumeNotFound, db.volume_get,
self.ctxt, volume['id']) self.ctxt, volume['id'])
@mock.patch('cinder.db.sqlalchemy.api.model_query')
def test_volume_destroy_deletes_dependent_data(self, mock_model_query):
"""Addresses LP Bug #1542169."""
db.volume_destroy(self.ctxt, fake.VOLUME_ID)
expected_call_count = 1 + len(sqlalchemy_api.VOLUME_DEPENDENT_MODELS)
self.assertEqual(expected_call_count, mock_model_query.call_count)
def test_volume_get_all(self): def test_volume_get_all(self):
volumes = [db.volume_create(self.ctxt, volumes = [db.volume_create(self.ctxt,
{'host': 'h%d' % i, 'size': i, {'host': 'h%d' % i, 'size': i,
'volume_type_id': fake.VOLUME_TYPE_ID}) 'volume_type_id': fake.VOLUME_TYPE_ID})
for i in range(3)] for i in range(3)]
self._assertEqualListsOfObjects(volumes, db.volume_get_all( self._assertEqualListsOfObjects(volumes, db.volume_get_all(
self.ctxt, None, None, ['host'], None)) self.ctxt, None, None, ['host'], None))
@ddt.data('cluster_name', 'host') @ddt.data('cluster_name', 'host')
def test_volume_get_all_filter_host_and_cluster(self, field): def test_volume_get_all_filter_host_and_cluster(self, field):
 End of changes. 1 change blocks. 
0 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)