SeaMicroPowerDriverTestCase is skipped

Bug #1312321 reported by aeva black
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
aeva black

Bug Description

ironic/tests/drivers/test_seamicro.py: SeaMicroPowerDriverTestCase is skipped today, if the python-seamicroclient library is not installed -- and by default (and in the gate) it is not installed. This is odd, because a unit test shouldn't depend on an external library, and we need to run these unit tests in the gate to ensure the SeaMicroPowerDriver continues to adhere to the PowerInterface API.

Suggested fix: mock the seamicro module within the SeaMicroPowerDriverTestCase class, rather than skip if it is not present.

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Rohan (kanaderohan)
Revision history for this message
aeva black (tenbrae) wrote :

This issue came up in discussing testing of 3par external libraries for cinder, and since it wasn't clear how to do that, either, I wanted to at least put up a proof of concept.

Rohan, I'd still appreciate your input on this, even though I've got some code up.

Thanks,
-D

Revision history for this message
aeva black (tenbrae) wrote :

Not sure why Jenkins hasn't posted a comment yet... I proposed code here:

https://review.openstack.org/#/c/90174/1

Changed in ironic:
assignee: Rohan (kanaderohan) → Devananda van der Veen (devananda)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/90174
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=990d6545fb7b3488769f7e2d15382a6f895a67b9
Submitter: Jenkins
Branch: master

commit 990d6545fb7b3488769f7e2d15382a6f895a67b9
Author: Devananda van der Veen <email address hidden>
Date: Thu Apr 24 11:10:32 2014 -0700

    Mock seamicroclient lib in unit tests if not present

    Mock the python-seamicroclient library from within ironic/tests/drivers
    so that test_seamicro.py can import ironic/drivers/modules/seamicro.py
    and run the unit tests on it, even when the external library is not
    present.

    Change-Id: I4f2cd75b2c64a5a280a5d45d5cea058fd432815b
    Closes-bug: #1312321

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-1 → 2014.2
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.