[openstack-dev] [gantt] How to include nova modules in unit tests

Dugger, Donald D donald.d.dugger at intel.com
Wed Jan 22 00:37:11 UTC 2014


Tnx, that worked great.

(Now if I can just find a way to get the affinity tests working, all the other tests pass.  I only have 17 tests failing out of 254.)

Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
Ph: 303/443-3786

From: Sylvain Bauza [mailto:sylvain.bauza at gmail.com]
Sent: Tuesday, January 21, 2014 4:25 PM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [gantt] How to include nova modules in unit tests

Hi Don,

Look at how Climate is doing this [1]. The idea is to pull the master tarball as an eggfile. That works fine, the only issues we have is when we register opts to CONF where we could get DuplicateOpt if we try to register opt with same name when importing.


[1] : https://github.com/stackforge/climate-nova/blob/master/test-requirements.txt#L15

2014/1/21 Dugger, Donald D <donald.d.dugger at intel.com<mailto:donald.d.dugger at intel.com>>
I almost have the unit tests for gantt working except for one problem - is there a way to have the test infrastructure allow the gantt tree to import objects from the nova tree.

The problem is that we want to break out just the scheduler code into the gantt tree without duplicating all of nova.  The current scheduler has many imports of nova objects, which is not a problem except for the unit tests.  The unit tests run in an environment that doesn't include the nova tree so all of those imports wind up failing.

Adding `nova' to the `test-requirements.txt' file doesn't work because this causes the test system to look for a tar ball at `http://pypi.python.org/simple/nova/' and there isn't a tarball there, just a link to the openstack home page.

I can get the unit tests working in my local tree by putting in a symlink to the nova directory but that doesn't seem like a real solution for Jenkins.

Anyone have an ideas on how to address this?

Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
Ph: 303/443-3786<tel:303%2F443-3786>

OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140122/31e3fa97/attachment.html>

More information about the OpenStack-dev mailing list