]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Skip brick_initiator test in virtual environments
authorDirk Mueller <dirk@dmllr.de>
Sat, 29 Jun 2013 17:28:27 +0000 (19:28 +0200)
committerDirk Mueller <dirk@dmllr.de>
Mon, 1 Jul 2013 09:20:37 +0000 (11:20 +0200)
/dev/disk/by-path does not exist in certain virtual
environments. Skip the test.

Fixes LP Bug #1196464

Change-Id: Ifc5bb061db59aaa6b7c089eda5e4eb1c9eff2dbf

cinder/tests/test_brick_initiator.py

index 0acbce3c82b9fe9bf96a9ee3d829b1d65326a7f7..0d0f6b0d7ad86c9ca8779fcf5dd06b2df7914982 100644 (file)
@@ -248,6 +248,8 @@ class ISCSIConnectorTestCase(ConnectorTestCase):
             }
         }
 
+    @test.testtools.skipUnless(os.path.exists('/dev/disk/by-path'),
+                               'Test requires /dev/disk/by-path')
     def test_connect_volume(self):
         self.stubs.Set(os.path, 'exists', lambda x: True)
         location = '10.0.2.15:3260'