Merge "Add test for container_update"

This commit is contained in:
Zuul 2018-08-27 06:48:15 +00:00 committed by Gerrit Code Review
commit 954810a628

View File

@ -1095,6 +1095,14 @@ class TestManager(base.TestCase):
self.compute_manager.container_update,
self.context, container, {})
@mock.patch.object(fake_driver, 'update')
def test_container_update_failed_resources(self, mock_update):
container = Container(self.context, **utils.get_test_container())
mock_update.side_effect = exception.ResourcesUnavailable
self.assertRaises(exception.ResourcesUnavailable,
self.compute_manager.container_update,
self.context, container, {})
@mock.patch.object(fake_driver, 'get_websocket_url')
@mock.patch.object(Container, 'save')
def test_container_attach_successful(self, mock_save,