Skip to content

Commit

Permalink
Unit test fails in pbuilder environment
Browse files Browse the repository at this point in the history
When running tests inside a pbuilder environment we don't
have /dev/disk/by-path directory and so the test_host_driver
test fails. Fix test by overriding the isdir method to
return True and pretend that the directory is there.

Closes-bug: #1244418

Change-Id: Ifd39d796b7f250b1ec45227a4262ebb33d5656bf
(cherry picked from commit ea51db5)
  • Loading branch information
Michael Kerrin authored and j-griffith committed Oct 25, 2013
1 parent eedc8ed commit da033f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cinder/tests/brick/test_brick_connector.py
Expand Up @@ -105,6 +105,7 @@ class HostDriverTestCase(test.TestCase):

def setUp(self):
super(HostDriverTestCase, self).setUp()
self.stubs.Set(os.path, 'isdir', lambda x: True)
self.devlist = ['device1', 'device2']
self.stubs.Set(os, 'listdir', lambda x: self.devlist)

Expand Down

0 comments on commit da033f1

Please sign in to comment.