Replace deprecated function in tempest

DeprecationWarning: Function 'tempest.test.services()' has moved to
'tempest.common.utils.services()' in version 'Pike' and will be
removed in a future version

Change-Id: Icc6409fcd140406b36a6a84dfa16de8a879cc3b2
This commit is contained in:
yushangbin 2017-09-04 10:13:28 +08:00
parent 95a7322ccd
commit 078a6c435e
3 changed files with 8 additions and 8 deletions

View File

@ -13,9 +13,9 @@
# under the License.
from oslo_log import log as logging
from tempest.common import utils
from tempest import config
from tempest.lib import decorators
from tempest import test
from barbican_tempest_plugin.tests.scenario import barbican_manager
@ -42,7 +42,7 @@ class EphemeralStorageEncryptionTest(barbican_manager.BarbicanScenarioTest):
'Ephemeral storage encryption is not supported')
@decorators.idempotent_id('afe720b9-8b35-4a3c-8ff3-15841c2d3148')
@test.services('compute', 'image')
@utils.services('compute', 'image')
def test_encrypted_ephemeral_lvm_storage(self):
test_string = 'Once upon a time ...'
client_test_path = '/tmp/ephemeral_disk_encryption_test'

View File

@ -13,10 +13,10 @@
# under the License.
from oslo_log import log as logging
from tempest.common import utils
from tempest import config
from tempest import exceptions
from tempest.lib import decorators
from tempest import test
from barbican_tempest_plugin.tests.scenario import barbican_manager
@ -27,7 +27,7 @@ LOG = logging.getLogger(__name__)
class ImageSigningTest(barbican_manager.BarbicanScenarioTest):
@decorators.idempotent_id('4343df3c-5553-40ea-8705-0cce73b297a9')
@test.services('compute', 'image')
@utils.services('compute', 'image')
def test_signed_image_upload_and_boot(self):
"""Test that Nova boots a signed image.
@ -49,7 +49,7 @@ class ImageSigningTest(barbican_manager.BarbicanScenarioTest):
self.servers_client.delete_server(instance['id'])
@decorators.idempotent_id('74f022d6-a6ef-4458-96b7-541deadacf99')
@test.services('compute', 'image')
@utils.services('compute', 'image')
def test_signed_image_upload_boot_failure(self):
"""Test that Nova refuses to boot an incorrectly signed image.

View File

@ -13,9 +13,9 @@
# under the License.
from oslo_log import log as logging
from tempest.common import utils
from tempest import config
from tempest.lib import decorators
from tempest import test
from barbican_tempest_plugin.tests.scenario import barbican_manager
@ -76,7 +76,7 @@ class VolumeEncryptionTest(barbican_manager.BarbicanScenarioTest):
self.nova_volume_detach(server, attached_volume)
@decorators.idempotent_id('89165fb4-5534-4b9d-8429-97ccffb8f86f')
@test.services('compute', 'volume', 'image')
@utils.services('compute', 'volume', 'image')
def test_encrypted_cinder_volumes_luks(self):
img_uuid = self.sign_and_upload_image()
LOG.info("Creating keypair and security group")
@ -95,7 +95,7 @@ class VolumeEncryptionTest(barbican_manager.BarbicanScenarioTest):
self.attach_detach_volume(server, volume, keypair)
@decorators.idempotent_id('cbc752ed-b716-4727-910f-956ccf965723')
@test.services('compute', 'volume', 'image')
@utils.services('compute', 'volume', 'image')
def test_encrypted_cinder_volumes_cryptsetup(self):
img_uuid = self.sign_and_upload_image()
LOG.info("Creating keypair and security group")