Enable tox use of site-packages for libvirt.

Enable the use of site-packages in tox which will allow the use of the
system install of libvirt while testing.
Hardcode the libvirt host UUID for tests that check this UUID when
system libvirt is being used. Without this hardcoding eight tests
would fail when using the system libvirt install.
Partially fixes bug #1113181
Change-Id: I59c5fbd45639962c0963298203c39759b6ca2d11
This commit is contained in:
Clark Boylan
2013年02月07日 21:39:31 -08:00
committed by Alessio Ababilov
parent 96c874cac5
commit dbbbbf4ecb

View File

@@ -291,6 +291,13 @@ class LibvirtConnTestCase(test.TestCase):
self.useFixture(fixtures.MonkeyPatch(
'nova.virt.libvirt.driver.libvirt_utils',
fake_libvirt_utils))
# Force libvirt to return a host UUID that matches the serial in
# nova.tests.fakelibvirt. This is necessary because the host UUID
# returned by libvirt becomes the serial whose value is checked for in
# test_xml_and_uri_* below.
self.useFixture(fixtures.MonkeyPatch(
'nova.virt.libvirt.driver.LibvirtDriver.get_host_uuid',
lambda _: 'cef19ce0-0ca2-11df-855d-b19fbce37686'))
self.useFixture(fixtures.MonkeyPatch(
'nova.virt.libvirt.imagebackend.libvirt_utils',
fake_libvirt_utils))

View File

@@ -2,6 +2,7 @@
envlist = py26,py27,pep8
[testenv]
sitepackages = True
setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
Reference in New Issue
openstack/nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.