tests fail when libvirt not installed

Bug #1257876 reported by Brian Lamar
20
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Brian Lamar

Bug Description

======================================================================
FAIL: nova.tests.virt.libvirt.test_libvirt.LibvirtNonblockingTestCase.test_tpool_execute_calls_libvirt
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/nova-virtualenv-debian6/nova/nova/tests/virt/libvirt/test_libvirt.py", line 7405, in test_tpool_execute_calls_libvirt
    conn = libvirt.virConnect()
TypeError: __init__() takes at least 3 arguments (1 given)

If libvirt is not installed, nova/tests/virt/libvirt/fakelibvirt.py defines libvirt.virConnect = fakelibvirt.Connection which does not have default parameters like the actual libvirt.virConnect. There is no way for tests to pass if libvirt is not installed.

Brian Lamar (blamar)
Changed in nova:
status: New → In Progress
assignee: nobody → Brian Lamar (blamar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/60052

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/60052
Committed: http://github.com/openstack/nova/commit/aded4a72b70d936df2771d1a6d35dd71e356de71
Submitter: Jenkins
Branch: master

commit aded4a72b70d936df2771d1a6d35dd71e356de71
Author: Brian Lamar <email address hidden>
Date: Wed Dec 4 14:04:34 2013 -0500

    Add default arguments for Connection class

    The fakelibvirt.Connection class, among other things, mocks
    libvirt.virConnect which doesn't require any parameters. This is
    causing a test to fail.

    Change-Id: If77864cb0d0bd1dae20b490b8e87a32a0951b52e
    Closes-Bug: 1257876

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-2
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-2 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/123053

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/havana)

Change abandoned by Alan Pevec (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/123053

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.