Commit
cf3cfb3a66066cfdc1ad15ac35b204d4a7b0301f modified
snapshot_get_by_host method (in db/sqlalchemy/api.py) to
return an empty list if the host argument is None or empty.
This patch updates the unit test to cover this case.
Change-Id: If09ac7587df8c4a3eae84b162d76f4168507aa52
self.ctxt,
'host2', {'fake_key': 'fake'}),
ignored_keys='volume')
+ # If host is None or empty string, empty list should be returned.
+ self.assertEqual([], db.snapshot_get_by_host(self.ctxt, None))
+ self.assertEqual([], db.snapshot_get_by_host(self.ctxt, ''))
def test_snapshot_get_by_host_with_pools(self):
db.volume_create(self.ctxt, {'id': 1, 'host': 'host1#pool1'})