diff --git a/watcher_tempest_plugin/tests/api/admin/base.py b/watcher_tempest_plugin/tests/api/admin/base.py index 3677958cc..bd236a768 100644 --- a/watcher_tempest_plugin/tests/api/admin/base.py +++ b/watcher_tempest_plugin/tests/api/admin/base.py @@ -17,6 +17,7 @@ import functools from tempest.lib.common.utils import data_utils +from tempest.lib.common.utils import test_utils from tempest import test from watcher_tempest_plugin import infra_optim_clients as clients @@ -59,7 +60,7 @@ class BaseInfraOptimTest(test.BaseTestCase): action_plans_to_be_deleted = set() # Phase 1: Make sure all objects are in an idle state for audit_uuid in cls.created_audits: - test.call_until_true( + test_utils.call_until_true( func=functools.partial( cls.is_audit_idle, audit_uuid), duration=30, @@ -73,7 +74,7 @@ class BaseInfraOptimTest(test.BaseTestCase): ap['uuid'] for ap in action_plans['action_plans']) for action_plan in action_plans['action_plans']: - test.call_until_true( + test_utils.call_until_true( func=functools.partial( cls.is_action_plan_idle, action_plan['uuid']), duration=30, @@ -213,7 +214,7 @@ class BaseInfraOptimTest(test.BaseTestCase): _, audit = cls.create_audit(audit_template_uuid, **audit_kwargs) audit_uuid = audit['uuid'] - assert test.call_until_true( + assert test_utils.call_until_true( func=functools.partial(cls.has_audit_finished, audit_uuid), duration=30, sleep_for=.5 diff --git a/watcher_tempest_plugin/tests/api/admin/test_action.py b/watcher_tempest_plugin/tests/api/admin/test_action.py index 709b25ba8..22fd11c9e 100644 --- a/watcher_tempest_plugin/tests/api/admin/test_action.py +++ b/watcher_tempest_plugin/tests/api/admin/test_action.py @@ -19,6 +19,7 @@ from __future__ import unicode_literals import collections import functools +from tempest.lib.common.utils import test_utils from tempest import test from watcher_tempest_plugin.tests.api.admin import base @@ -34,7 +35,7 @@ class TestShowListAction(base.BaseInfraOptimTest): _, cls.audit_template = cls.create_audit_template(cls.goal['uuid']) _, cls.audit = cls.create_audit(cls.audit_template['uuid']) - assert test.call_until_true( + assert test_utils.call_until_true( func=functools.partial(cls.has_audit_finished, cls.audit['uuid']), duration=30, sleep_for=.5 diff --git a/watcher_tempest_plugin/tests/api/admin/test_action_plan.py b/watcher_tempest_plugin/tests/api/admin/test_action_plan.py index a27fc8dc9..783a7a4c7 100644 --- a/watcher_tempest_plugin/tests/api/admin/test_action_plan.py +++ b/watcher_tempest_plugin/tests/api/admin/test_action_plan.py @@ -18,6 +18,7 @@ from __future__ import unicode_literals import functools +from tempest.lib.common.utils import test_utils from tempest.lib import exceptions from tempest import test @@ -33,7 +34,7 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest): _, audit_template = self.create_audit_template(goal['uuid']) _, audit = self.create_audit(audit_template['uuid']) - self.assertTrue(test.call_until_true( + self.assertTrue(test_utils.call_until_true( func=functools.partial(self.has_audit_finished, audit['uuid']), duration=30, sleep_for=.5 @@ -53,7 +54,7 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest): _, audit_template = self.create_audit_template(goal['uuid']) _, audit = self.create_audit(audit_template['uuid']) - self.assertTrue(test.call_until_true( + self.assertTrue(test_utils.call_until_true( func=functools.partial(self.has_audit_finished, audit['uuid']), duration=30, sleep_for=.5 @@ -75,7 +76,7 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest): _, audit_template = self.create_audit_template(goal['uuid']) _, audit = self.create_audit(audit_template['uuid']) - self.assertTrue(test.call_until_true( + self.assertTrue(test_utils.call_until_true( func=functools.partial(self.has_audit_finished, audit['uuid']), duration=30, sleep_for=.5 @@ -94,7 +95,7 @@ class TestCreateDeleteExecuteActionPlan(base.BaseInfraOptimTest): # Execute the action by changing its state to PENDING _, updated_ap = self.client.start_action_plan(action_plan['uuid']) - self.assertTrue(test.call_until_true( + self.assertTrue(test_utils.call_until_true( func=functools.partial( self.has_action_plan_finished, action_plan['uuid']), duration=30, @@ -116,7 +117,7 @@ class TestShowListActionPlan(base.BaseInfraOptimTest): _, cls.audit_template = cls.create_audit_template(cls.goal['uuid']) _, cls.audit = cls.create_audit(cls.audit_template['uuid']) - assert test.call_until_true( + assert test_utils.call_until_true( func=functools.partial(cls.has_audit_finished, cls.audit['uuid']), duration=30, sleep_for=.5 diff --git a/watcher_tempest_plugin/tests/api/admin/test_audit.py b/watcher_tempest_plugin/tests/api/admin/test_audit.py index 8eb99ad92..d764082a0 100644 --- a/watcher_tempest_plugin/tests/api/admin/test_audit.py +++ b/watcher_tempest_plugin/tests/api/admin/test_audit.py @@ -18,6 +18,7 @@ from __future__ import unicode_literals import functools +from tempest.lib.common.utils import test_utils from tempest.lib import exceptions from tempest import test @@ -125,7 +126,7 @@ class TestCreateUpdateDeleteAudit(base.BaseInfraOptimTest): _, body = self.create_audit(audit_template['uuid']) audit_uuid = body['uuid'] - test.call_until_true( + test_utils.call_until_true( func=functools.partial( self.is_audit_idle, audit_uuid), duration=10, @@ -140,7 +141,7 @@ class TestCreateUpdateDeleteAudit(base.BaseInfraOptimTest): self.delete_audit(audit_uuid) - test.call_until_true( + test_utils.call_until_true( func=functools.partial(is_audit_deleted, audit_uuid), duration=5, sleep_for=1 diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py b/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py index e65b672ee..a3951ae08 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_basic_optim.py @@ -20,7 +20,7 @@ from __future__ import unicode_literals import functools from tempest import config -from tempest import test +from tempest.lib.common.utils import test_utils from watcher_tempest_plugin.tests.scenario import base @@ -84,7 +84,7 @@ class TestExecuteBasicStrategy(base.BaseInfraOptimScenarioTest): except Exception: return False - assert test.call_until_true( + assert test_utils.call_until_true( func=_are_compute_nodes_setup, duration=600, sleep_for=2 @@ -146,7 +146,7 @@ class TestExecuteBasicStrategy(base.BaseInfraOptimScenarioTest): _, audit = self.create_audit(audit_template['uuid']) try: - self.assertTrue(test.call_until_true( + self.assertTrue(test_utils.call_until_true( func=functools.partial( self.has_audit_finished, audit['uuid']), duration=600, @@ -174,7 +174,7 @@ class TestExecuteBasicStrategy(base.BaseInfraOptimScenarioTest): # Execute the action by changing its state to PENDING _, updated_ap = self.client.start_action_plan(action_plan['uuid']) - self.assertTrue(test.call_until_true( + self.assertTrue(test_utils.call_until_true( func=functools.partial( self.has_action_plan_finished, action_plan['uuid']), duration=600, diff --git a/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py b/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py index 27cdaad6a..33b108a6c 100644 --- a/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py +++ b/watcher_tempest_plugin/tests/scenario/test_execute_dummy_optim.py @@ -20,7 +20,7 @@ from __future__ import unicode_literals import collections import functools -from tempest import test +from tempest.lib.common.utils import test_utils from watcher_tempest_plugin.tests.scenario import base @@ -41,7 +41,7 @@ class TestExecuteDummyStrategy(base.BaseInfraOptimScenarioTest): _, audit_template = self.create_audit_template(goal['uuid']) _, audit = self.create_audit(audit_template['uuid']) - self.assertTrue(test.call_until_true( + self.assertTrue(test_utils.call_until_true( func=functools.partial(self.has_audit_finished, audit['uuid']), duration=30, sleep_for=.5 @@ -63,7 +63,7 @@ class TestExecuteDummyStrategy(base.BaseInfraOptimScenarioTest): # Execute the action by changing its state to PENDING _, updated_ap = self.client.start_action_plan(action_plan['uuid']) - self.assertTrue(test.call_until_true( + self.assertTrue(test_utils.call_until_true( func=functools.partial( self.has_action_plan_finished, action_plan['uuid']), duration=30,