libvirt test_spawn_with_network_info is broken

Bug #1053572 reported by Johannes Erdfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Nikola Đipanov

Bug Description

While working on cleaning up poor uses of 'except Exception', I stumbled upon test_spawn_with_network_info.

The call to conn.spawn is failing because of a missing implementation of getLibVersion(), not because of the unexpected method call, or SHA1 type problems intended to be tested.

Creating an implementation of getLibVersion() gets to an unimplemented getCapabilities() call which is trickier.

I stopped at this point since it's not clear what the best fix is, or even if this test is still necessary.

I do know that the use of 'except Exception' is broken and hiding the fact the test is broken.

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Changed in nova:
assignee: nobody → Nikola Đipanov (ndipanov)
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/14284

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit c1e5e3352a71cc61ba9e7dba0d9048d8b766e2c0
Author: Nikola Dipanov <email address hidden>
Date: Wed Oct 10 13:47:26 2012 +0200

    Fixes test_libvirtr spawn_with_network_info test

    This patch fixes the LibvirtConnTestCase.test_spawn_with_network_info
    test case that was reported as bug 1053572.

    The new implementation of the test makes no assumptions about the raised
    exceptions, and exercises the LibvirtDriver.spawn method completely.
    The test has the network_info faked and the libvirt connection mocked out.

    In addition. it also fixes the fake_network.FakeVIFDriver class used in
    this test to return a LibvirtConfigGuestInterface instance with fake
    values instead of just a dict. Also fixes some docstring inaccuracies
    in the nova.libvirt.vif module that may have lead to the FakeVIFDrivers
    wrong implementation before.

    Fixes bug 1053572

    Change-Id: Ie5b69a2269ab099267231329eae21bd308fef835

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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