nova xenapi unit tests fail with os-xenapi 0.3.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
OpenStack Global Requirements |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Noticed here: https:/
Failures are here: http://
For example:
nova.tests.
Traceback (most recent call last):
File "nova/tests/
self.compute = manager.
File "nova/compute/
self.driver = driver.
File "nova/virt/
virtapi)
File "/home/
return import_
File "nova/virt/
originator=
File "/home/
self.ip = self._get_
File "/home/
return socket.
File "/home/
rrset = resolve(hostname)
File "/home/
raise EAI_NODATA_ERROR
socket.gaierror: [Errno -5] No address associated with hostname
It looks like this is due to this change that went into os-xenapi 0.3.0:
https:/
I don't know if this is an issue in os-xenapi (regression) or if nova needs to now start stubbing out the XenAPISession init code.
It looks like the unit tests within os-xenapi are mocking out the call to the socket module:
https:/
It would be nice if there were a fixture class in the os-xenapi library that nova's xenapi unit tests could load and that would perform the proper stubs like this.
Changed in nova: | |
status: | New → Confirmed |
tags: | added: test xenserver |
tags: |
added: testing removed: test |
Changed in openstack-requirements: | |
status: | New → Confirmed |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in openstack-requirements: | |
status: | Confirmed → Fix Released |
I think the other possible reason this could be failing the unit tests is that the url being passed in is None, since it comes from CONF.xenserver. connection_ url and that's not set globally in tests.