From 98fa684a048fa7a1f16ebc416fb0101ba0525ac4 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Sat, 2 Feb 2013 19:22:18 -0600 Subject: [PATCH] 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 --- cinder/tests/scheduler/test_host_filters.py | 4 ++++ 1 file changed, 4 insertions(+) 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']() -- 2.45.2