]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Skip tests if cinder is not installed
authorChuck Short <chuck.short@canonical.com>
Sun, 3 Feb 2013 01:22:18 +0000 (19:22 -0600)
committerChuck Short <chuck.short@canonical.com>
Sun, 3 Feb 2013 01:23:52 +0000 (19:23 -0600)
The test_capacity_filter_passes_infinite and test_capacity_filter_passes_unknown
tests were failing when cinder is not installed. Skip the tests like the other
tests for test_host_filters.

Change-Id: I5ebfa2dca05b6e89a12e3153598bf4699da888de
Signed-off-by: Chuck Short <chuck.short@canonical.com>
cinder/tests/scheduler/test_host_filters.py

index 278611330d1615e42d9c5a5f7ea1fa877980fbf0..a6fb856cb042bcae66ccea0df0bef08024e3c105 100644 (file)
@@ -103,6 +103,8 @@ class HostFiltersTestCase(test.TestCase):
                                     'service': service})
         self.assertFalse(filt_cls.host_passes(host, filter_properties))
 
+    @test.skip_if(not test_utils.is_cinder_installed(),
+                  'Test requires Cinder installed')
     def test_capacity_filter_passes_infinite(self):
         self._stub_service_is_up(True)
         filt_cls = self.class_map['CapacityFilter']()
@@ -114,6 +116,8 @@ class HostFiltersTestCase(test.TestCase):
                                     'service': service})
         self.assertTrue(filt_cls.host_passes(host, filter_properties))
 
+    @test.skip_if(not test_utils.is_cinder_installed(),
+                  'Test requires Cinder installed')
     def test_capacity_filter_passes_unknown(self):
         self._stub_service_is_up(True)
         filt_cls = self.class_map['CapacityFilter']()