Brick HostDriver test failure

Bug #1244418 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Michael Kerrin
Havana
Fix Released
Low
John Griffith

Bug Description

======================================================================
FAIL: cinder.tests.brick.test_brick_connector.HostDriverTestCase.test_host_driver
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  pythonlogging:''-1
  stderr
  stdout

Traceback (most recent call last):
  File "/opt/stack/cinder/cinder/tests/brick/test_brick_connector.py", line 115, in test_host_driver
    self.assertEqual(expected, actual)
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 322, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", 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().

Tags: brick
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/53738

Changed in cinder:
assignee: nobody → Eric Harney (eharney)
status: New → In Progress
Revision history for this message
John Griffith (john-griffith) wrote :
Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/havana)

Reviewed: https://review.openstack.org/53743
Committed: http://github.com/openstack/cinder/commit/da033f19bcbd59545192a0a2a39a95662bab216a
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)
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: in-stable-havana
Changed in cinder:
assignee: Eric Harney (eharney) → Michael Kerrin (michael-kerrin-w)
importance: Undecided → Low
Mike Perez (thingee)
tags: added: brick
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.