*** This bug is a duplicate of bug 1414708 ***
    https://bugs.launchpad.net/bugs/1414708

We removed the dependency on libvirt in unit tests here:

https://github.com/openstack/nova/commit/50861d3221f625a5cc589d903054bb2c440b4026

** This bug has been marked a duplicate of bug 1414708
   libvirt unit tests are failing if no real libvirt installed

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1357437

Title:
  nova.tests.virt.libvirt.test_driver should use constants from
  fakelibvirt

Status in OpenStack Compute (Nova):
  Confirmed

Bug description:
  Commit f0883800660ab546f5667b973f339c4df4c5c458 adds some tests and
  new constants for _swap_volume and _live_snapshot, one of which is
  VIR_DOMAIN_BLOCK_REBASE_COPY.  It adds the required constants to the
  fakelibvirt module but doesn't use them when making assertions in the
  test, which can fail if you're not using fakelibvirt but not using a
  new enough version of libvirt on your system.

  I realize that we now require libvirt-python >= 1.2.5 for testing, but
  that requires libvirt >= 0.9.11 and if you're on 0.9.11 it doesn't
  have VIR_DOMAIN_BLOCK_REBASE_COPY  defined in libvirt.h.in:

  
http://libvirt.org/git/?p=libvirt.git;a=blob;f=include/libvirt/libvirt.h.in;h=499dcd4514bf793b531e53496c56237fb055e1ba;hb=782afa98e4a5fa9a0927a9e32f9cf36082a2e8e7

  It seems kind of strange to me that we use constants directly from the
  libvirt module at all in test_driver given the import conditional
  check at the top of the module:

  
http://git.openstack.org/cgit/openstack/nova/tree/nova/tests/virt/libvirt/test_driver.py#n88

  try:
      import libvirt
  except ImportError:
      libvirt = fakelibvirt
  libvirt_driver.libvirt = libvirt

  Given that, any change that requires testing new constants from
  libvirt should be in fakelibvirt, and we should use fakelibvirt when
  using those constants in the tests, otherwise the "unit" tests are
  really dependent on your environment.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1357437/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to