nova fake libvirt library breaking tests
fixes bug #1074488 Nova libvirt fake library was updated to include additional 'virtapi' arg required and our tests do not pass any args to it therefore breaking them. dansmith recommended to change fake.FakeDriver to Fake.FakeVirtAPI which will replicate the old functionality. Change-Id: Iedcd32cd038c6043d782565312adf5fcba8d9b7a
This commit is contained in:
parent
5a21eee3c6
commit
415453bfe8
@ -86,6 +86,7 @@ class TestDiskIOPollster(TestLibvirtBase):
|
|||||||
|
|
||||||
@skip.skip_if(libvirt_missing, 'Test requires libvirt')
|
@skip.skip_if(libvirt_missing, 'Test requires libvirt')
|
||||||
def test_fetch_diskio(self):
|
def test_fetch_diskio(self):
|
||||||
|
flags.FLAGS.compute_driver = 'fake.FakeVirtAPI'
|
||||||
list(self.pollster.get_counters(self.manager, self.instance))
|
list(self.pollster.get_counters(self.manager, self.instance))
|
||||||
#assert counters
|
#assert counters
|
||||||
# FIXME(dhellmann): The CI environment doesn't produce
|
# FIXME(dhellmann): The CI environment doesn't produce
|
||||||
@ -94,7 +95,7 @@ class TestDiskIOPollster(TestLibvirtBase):
|
|||||||
|
|
||||||
@skip.skip_if(libvirt_missing, 'Test requires libvirt')
|
@skip.skip_if(libvirt_missing, 'Test requires libvirt')
|
||||||
def test_fetch_diskio_not_libvirt(self):
|
def test_fetch_diskio_not_libvirt(self):
|
||||||
flags.FLAGS.compute_driver = 'fake.FakeDriver'
|
flags.FLAGS.compute_driver = 'fake.FakeVirtAPI'
|
||||||
flags.FLAGS.connection_type = 'fake'
|
flags.FLAGS.connection_type = 'fake'
|
||||||
counters = list(self.pollster.get_counters(self.manager,
|
counters = list(self.pollster.get_counters(self.manager,
|
||||||
self.instance))
|
self.instance))
|
||||||
@ -102,6 +103,7 @@ class TestDiskIOPollster(TestLibvirtBase):
|
|||||||
|
|
||||||
@skip.skip_if(libvirt_missing, 'Test requires libvirt')
|
@skip.skip_if(libvirt_missing, 'Test requires libvirt')
|
||||||
def test_fetch_diskio_with_libvirt_non_existent_instance(self):
|
def test_fetch_diskio_with_libvirt_non_existent_instance(self):
|
||||||
|
flags.FLAGS.compute_driver = 'fake.FakeVirtAPI'
|
||||||
instance = mock.MagicMock()
|
instance = mock.MagicMock()
|
||||||
instance.name = 'instance-00000999'
|
instance.name = 'instance-00000999'
|
||||||
instance.id = 999
|
instance.id = 999
|
||||||
|
Loading…
Reference in New Issue
Block a user