]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Skip incompatible test on OSX
authorJohn Griffith <john.griffith8@gmail.com>
Wed, 30 Jul 2014 02:20:31 +0000 (20:20 -0600)
committerJohn Griffith <john.griffith8@gmail.com>
Wed, 30 Jul 2014 02:24:04 +0000 (20:24 -0600)
Can't seem to get the test:
cinder.tests.test_volume.VolumeTestCase.test_delete_no_dev_fails
to run right, tried macports and homebrew versions of fileutils
but still get makedir failures. Give up and just detect if OSX
and skip.

Change-Id: Ic2f7603cf2960e2fbaac9fce677461f60ded541d

cinder/tests/test_volume.py

index c72178dc0fd65c2e1794839ae57c81f871f3a311..35d04731867d2ddbf6a60d4c14d59c67841a94d3 100644 (file)
@@ -24,6 +24,7 @@ import mock
 import os
 import shutil
 import socket
+from sys import platform
 import tempfile
 
 import eventlet
@@ -71,7 +72,7 @@ QUOTAS = quota.QUOTAS
 CONF = cfg.CONF
 
 ENCRYPTION_PROVIDER = 'nova.volume.encryptors.cryptsetup.CryptsetupEncryptor'
-
+PLATFORM = platform
 fake_opt = [
     cfg.StrOpt('fake_opt', default='fake', help='fake opts')
 ]
@@ -1937,6 +1938,7 @@ class VolumeTestCase(BaseVolumeTestCase):
         self.volume.delete_snapshot(self.context, snapshot_id)
         self.volume.delete_volume(self.context, volume_id)
 
+    @test.testtools.skipIf(platform == "darwin", "SKIP on OSX")
     def test_delete_no_dev_fails(self):
         """Test delete snapshot with no dev file fails."""
         self.stubs.Set(os.path, 'exists', lambda x: False)