]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Skip tests if cinder is not installed
authorChuck Short <chuck.short@canonical.com>
Mon, 18 Feb 2013 14:11:20 +0000 (08:11 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Mon, 18 Feb 2013 21:55:59 +0000 (14:55 -0700)
Skipp test_restry_disabled and test_retry_attempt_one
if cinder is not installed.

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

index 6579d6cb9dfcf40ac9e8b017ffc35d6438f59142..05b9d1d809c2c8431a32e974adf3f6397e0fc6a0 100644 (file)
@@ -124,6 +124,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
         self.assertRaises(exception.InvalidParameterValue,
                           fakes.FakeFilterScheduler)
 
+    @test.skip_if(not test_utils.is_cinder_installed(),
+                  'Test requires Cinder installed (try setup.py develop')
     def test_retry_disabled(self):
         # Retry info should not get populated when re-scheduling is off.
         self.flags(scheduler_max_attempts=1)
@@ -140,6 +142,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
         # should not have retry info in the populated filter properties:
         self.assertFalse("retry" in filter_properties)
 
+    @test.skip_if(not test_utils.is_cinder_installed(),
+                  'Test requires Cinder installed (try setup.py develop')
     def test_retry_attempt_one(self):
         # Test retry logic on initial scheduling attempt.
         self.flags(scheduler_max_attempts=2)
@@ -156,6 +160,8 @@ class FilterSchedulerTestCase(test_scheduler.SchedulerTestCase):
         num_attempts = filter_properties['retry']['num_attempts']
         self.assertEqual(1, num_attempts)
 
+    @test.skip_if(not test_utils.is_cinder_installed(),
+                  'Test requires Cinder installed (try setup.py develop')
     def test_retry_attempt_two(self):
         # Test retry logic when re-scheduling.
         self.flags(scheduler_max_attempts=2)