]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Mock socket.gethostbyaddr in test_v7000_fcp
authorMichal Dulko <michal.dulko@intel.com>
Wed, 1 Jul 2015 06:41:03 +0000 (08:41 +0200)
committerMichal Dulko <michal.dulko@intel.com>
Wed, 1 Jul 2015 06:41:03 +0000 (08:41 +0200)
commit5d5cfc6408ee55826e18a6b1f56a81114ed47da2
tree5a93facc51e310aefd26304b01dde14578703b4f
parent87016e624b8dd5574d0c678e5869510b1358a7da
Mock socket.gethostbyaddr in test_v7000_fcp

Currently test_v7000_fcp doesn't mock socket.gethostbyaddr and
hardcodes expected response to be google-public-dns-a.google.com
(as it is querying for 8.8.8.8 as IP). This introduces dependency on
external DNS lookup to pass unit tests and causes problems with
running tests behind a proxy.

This commit mocks socket.gethostbyaddr in the problematic test.

Change-Id: I3a0288d8e51c832a72e16e23af5adbee990f9e20
Closes-Bug: 1470113
cinder/tests/unit/test_v7000_fcp.py