From 159fe895f86749fbc505dd6e0ec94491e84209dd Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Fri, 27 Jan 2017 06:35:37 +0000 Subject: [PATCH] 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 --- ironic_tempest_plugin/tests/test_basic.py | 7 ++++--- ironic_tempest_plugin/tests/test_discovery.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ironic_tempest_plugin/tests/test_basic.py b/ironic_tempest_plugin/tests/test_basic.py index 7d9cc72..dd14a40 100644 --- a/ironic_tempest_plugin/tests/test_basic.py +++ b/ironic_tempest_plugin/tests/test_basic.py @@ -11,6 +11,7 @@ # under the License. from tempest.config import CONF +from tempest.lib import decorators from tempest import test # noqa from ironic_inspector.test.inspector_tempest_plugin.tests import manager @@ -56,7 +57,7 @@ class InspectorBasicTest(manager.InspectorScenarioTest): timeout=CONF.baremetal.active_timeout, 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') def test_baremetal_introspection(self): """This smoke test case follows this set of operations: @@ -109,7 +110,7 @@ class InspectorBasicTest(manager.InspectorScenarioTest): ins, _node = self.boot_instance() 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): """This smoke test case follows this very basic set of operations: @@ -146,7 +147,7 @@ class InspectorBasicTest(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.services('object_storage') def test_baremetal_introspection(self): diff --git a/ironic_tempest_plugin/tests/test_discovery.py b/ironic_tempest_plugin/tests/test_discovery.py index 439d6d5..3880f60 100644 --- a/ironic_tempest_plugin/tests/test_discovery.py +++ b/ironic_tempest_plugin/tests/test_discovery.py @@ -14,6 +14,7 @@ import six from ironic_tempest_plugin.tests.scenario import baremetal_manager from tempest import config +from tempest.lib import decorators from tempest import test # noqa 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]), 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): """This test case follows this set of operations: