Brick HostDriver test failure

Bug #1244418 reported by Eric Harney on 2013-10-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Michael Kerrin
John Griffith

Bug Description

FAIL: cinder.tests.brick.test_brick_connector.HostDriverTestCase.test_host_driver
_StringException: Empty attachments:

Traceback (most recent call last):
  File "/opt/stack/cinder/cinder/tests/brick/", line 115, in test_host_driver
    self.assertEqual(expected, actual)
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/", line 322, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/", line 417, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: ['/dev/disk/by-path/device1', '/dev/disk/by-path/device2'] != []

Reading this failure and the code, it looks like this test probably is not mocking out something correctly. Seen on master @91d388b38.

Probably introduced by 1766a5a "Check if dir exists before calling listdir" not including a mock for isdir().

Fix proposed to branch: master

Changed in cinder:
assignee: nobody → Eric Harney (eharney)
status: New → In Progress
John Griffith (john-griffith) wrote :
Changed in cinder:
status: In Progress → Fix Committed

Submitter: Jenkins
Branch: stable/havana

commit da033f19bcbd59545192a0a2a39a95662bab216a
Author: Michael Kerrin <email address hidden>
Date: Thu Oct 24 15:17:47 2013 +0000

    Unit test fails in pbuilder environment

    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 ea51db596906c663e0c04b546b3ca79873dd74f0)

tags: added: in-stable-havana
Thierry Carrez (ttx) on 2013-12-04
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Alan Pevec (apevec) on 2013-12-09
tags: removed: in-stable-havana
Changed in cinder:
assignee: Eric Harney (eharney) → Michael Kerrin (michael-kerrin-w)
importance: Undecided → Low
Mike Perez (thingee) on 2013-12-09
tags: added: brick
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers