Switch to decorators.idempotent_id

test.idempotent_id is being kept temporary to migrate
to new lib interface. Now idempotent_id is available as Tempest stable
interface decorators and all plugins tests using the old decorator
should be switched to new interface.

In future, Once all plugins are switched to new decorator Tempest
will remove the test.idempotent_id

Change-Id: I993fcd22070dca995fb2fb59e876230e8fd0df9e
Related-Bug: 1616913
This commit is contained in:
ghanshyam 2017-01-27 06:35:37 +00:00
parent d557080623
commit aeb72b87f5
2 changed files with 6 additions and 4 deletions

View File

@ -11,6 +11,7 @@
# under the License. # under the License.
from tempest.config import CONF from tempest.config import CONF
from tempest.lib import decorators
from tempest import test # noqa from tempest import test # noqa
from ironic_inspector.test.inspector_tempest_plugin.tests import manager from ironic_inspector.test.inspector_tempest_plugin.tests import manager
@ -56,7 +57,7 @@ class InspectorBasicTest(manager.InspectorScenarioTest):
timeout=CONF.baremetal.active_timeout, timeout=CONF.baremetal.active_timeout,
interval=self.wait_provisioning_state_interval) interval=self.wait_provisioning_state_interval)
@test.idempotent_id('03bf7990-bee0-4dd7-bf74-b97ad7b52a4b') @decorators.idempotent_id('03bf7990-bee0-4dd7-bf74-b97ad7b52a4b')
@test.services('compute', 'image', 'network', 'object_storage') @test.services('compute', 'image', 'network', 'object_storage')
def test_baremetal_introspection(self): def test_baremetal_introspection(self):
"""This smoke test case follows this set of operations: """This smoke test case follows this set of operations:
@ -109,7 +110,7 @@ class InspectorBasicTest(manager.InspectorScenarioTest):
ins, _node = self.boot_instance() ins, _node = self.boot_instance()
self.terminate_instance(ins) self.terminate_instance(ins)
@test.idempotent_id('70ca3070-184b-4b7d-8892-e977d2bc2870') @decorators.idempotent_id('70ca3070-184b-4b7d-8892-e977d2bc2870')
def test_introspection_abort(self): def test_introspection_abort(self):
"""This smoke test case follows this very basic set of operations: """This smoke test case follows this very basic set of operations:
@ -146,7 +147,7 @@ class InspectorBasicTest(manager.InspectorScenarioTest):
class InspectorSmokeTest(manager.InspectorScenarioTest): class InspectorSmokeTest(manager.InspectorScenarioTest):
@test.idempotent_id('a702d1f1-88e4-42ce-88ef-cba2d9e3312e') @decorators.idempotent_id('a702d1f1-88e4-42ce-88ef-cba2d9e3312e')
@test.attr(type='smoke') @test.attr(type='smoke')
@test.services('object_storage') @test.services('object_storage')
def test_baremetal_introspection(self): def test_baremetal_introspection(self):

View File

@ -14,6 +14,7 @@ import six
from ironic_tempest_plugin.tests.scenario import baremetal_manager from ironic_tempest_plugin.tests.scenario import baremetal_manager
from tempest import config from tempest import config
from tempest.lib import decorators
from tempest import test # noqa from tempest import test # noqa
from ironic_inspector.test.inspector_tempest_plugin.tests import manager from ironic_inspector.test.inspector_tempest_plugin.tests import manager
@ -113,7 +114,7 @@ class InspectorDiscoveryTest(manager.InspectorScenarioTest):
self.assertEqual(six.text_type(node_info['driver_info'][key]), self.assertEqual(six.text_type(node_info['driver_info'][key]),
inspected_node['driver_info'].get(key)) inspected_node['driver_info'].get(key))
@test.idempotent_id('dd3abe5e-0d23-488d-bb4e-344cdeff7dcb') @decorators.idempotent_id('dd3abe5e-0d23-488d-bb4e-344cdeff7dcb')
def test_bearmetal_auto_discovery(self): def test_bearmetal_auto_discovery(self):
"""This test case follows this set of operations: """This test case follows this set of operations: