Skip test_server_rescue with volumes when there is no Cinder

Change-Id: I34969b03230eff2a52f923d4e21fdf9248f247c1
Closes-Bug: #1904131
This commit is contained in:
Slawek Kaplonski 2020-11-13 10:09:43 +01:00 committed by Ghanshyam Mann
parent 805f2a070b
commit bc360aeb0f
1 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,7 @@
import testtools import testtools
from tempest.api.compute import base from tempest.api.compute import base
from tempest.common import utils
from tempest.common import waiters from tempest.common import waiters
from tempest import config from tempest import config
from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import data_utils
@ -189,6 +190,7 @@ class ServerStableDeviceRescueTest(BaseServerStableDeviceRescueTest):
self._test_stable_device_rescue(server_id, rescue_image_id) self._test_stable_device_rescue(server_id, rescue_image_id)
@decorators.idempotent_id('a3772b42-00bf-4310-a90b-1cc6fd3e7eab') @decorators.idempotent_id('a3772b42-00bf-4310-a90b-1cc6fd3e7eab')
@utils.services('volume')
def test_stable_device_rescue_disk_virtio_with_volume_attached(self): def test_stable_device_rescue_disk_virtio_with_volume_attached(self):
"""Test rescuing server with volume attached """Test rescuing server with volume attached
@ -214,6 +216,13 @@ class ServerBootFromVolumeStableRescueTest(BaseServerStableDeviceRescueTest):
min_microversion = '2.87' min_microversion = '2.87'
@classmethod
def skip_checks(cls):
super(ServerBootFromVolumeStableRescueTest, cls).skip_checks()
if not CONF.service_available.cinder:
skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
raise cls.skipException(skip_msg)
@decorators.attr(type='slow') @decorators.attr(type='slow')
@decorators.idempotent_id('48f123cb-922a-4065-8db6-b9a9074a556b') @decorators.idempotent_id('48f123cb-922a-4065-8db6-b9a9074a556b')
def test_stable_device_rescue_bfv_blank_volume(self): def test_stable_device_rescue_bfv_blank_volume(self):