From: Chuck Short Date: Sun, 3 Feb 2013 01:22:18 +0000 (-0600) Subject: Skip tests if cinder is not installed X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=98fa684a048fa7a1f16ebc416fb0101ba0525ac4;p=openstack-build%2Fcinder-build.git Skip tests if cinder is not installed 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 --- diff --git a/cinder/tests/scheduler/test_host_filters.py b/cinder/tests/scheduler/test_host_filters.py index 278611330..a6fb856cb 100644 --- a/cinder/tests/scheduler/test_host_filters.py +++ b/cinder/tests/scheduler/test_host_filters.py @@ -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']()