Merge "Port xenapi test_vm_utils to Python 3"

This commit is contained in:
Jenkins 2017-01-10 06:10:24 +00:00 committed by Gerrit Code Review
commit da54487eda
2 changed files with 2 additions and 6 deletions

View File

@ -882,6 +882,7 @@ class UnplugVbdTestCase(VMUtilsTestBase):
def test_unplug_vbd_raises_unexpected_error(self):
session = stubs.get_fake_session()
session.XenAPI.Failure = fake.Failure
vbd_ref = "vbd_ref"
vm_ref = 'vm_ref'
session.call_xenapi.side_effect = test.TestingException()
@ -1469,6 +1470,7 @@ class ScanSrTestCase(VMUtilsTestBase):
def test_scan_sr_unknown_error_fails_once(self):
session = mock.Mock()
session.XenAPI.Failure = fake.Failure
session.call_xenapi.side_effect = test.TestingException
self.assertRaises(test.TestingException,
vm_utils._scan_sr, session, "sr_ref")
@ -2423,9 +2425,6 @@ class ResizeFunctionTestCase(test.NoDBTestCase):
def test_empty(self):
self._test_is_resize("", "")
def test_bad_version(self):
self._test_is_resize("XenServer", "asdf")
class VMInfoTests(VMUtilsTestBase):
def setUp(self):

View File

@ -1,8 +1,5 @@
nova.tests.unit.api.openstack.compute.test_user_data.ServersControllerCreateTest
nova.tests.unit.test_wsgi.TestWSGIServerWithSSL
nova.tests.unit.virt.xenapi.test_vm_utils.ResizeFunctionTestCase
nova.tests.unit.virt.xenapi.test_vm_utils.ScanSrTestCase
nova.tests.unit.virt.xenapi.test_vm_utils.UnplugVbdTestCase
##########################################################################
# NOTE(dims): The following tests randomly fail in the gate. Please be