From fb661825fc02efa8414d8842d4e3e3ed289f7e83 Mon Sep 17 00:00:00 2001 From: Boris Pavlovic Date: Tue, 18 Aug 2015 16:29:08 -0700 Subject: [PATCH] Switch scenarios plugins to plugin base This patch finishes work on switching all plugin types to the single code base. This reduce amount of code and unifies all plugins which makes it simple to work on any kind of common plugin functionality: Deprecation, Info, Validation and so on.. In this patch: * Scenario.meta was removed and now MetaMixin is used * ScenarioGroups are removed This reduce framework complexity. One thing less that you should know and understand to start. * Scenario plugins can be explit set through configure() ** Unified with other kind of plugins ** Flexibility it is simpler to move and rename plugins with deprecation * Remove all unused Scenario methods * Improve rally.info substitution it's okay if we specify each part of name of the plguin Future steps (not in this patch) are: * Refactor plugin info and reduce copy paste inside that module * Refactor atomic action (make the work for context too) * Refactor validation (make scenario validation generic enough to work with all types of plugins) Change-Id: Ibecb8006ebb5d670bcf4519e9f0d6a505e385a1a --- tests/unit/doc/test_task_samples.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/unit/doc/test_task_samples.py b/tests/unit/doc/test_task_samples.py index 103c05a7..df218df7 100644 --- a/tests/unit/doc/test_task_samples.py +++ b/tests/unit/doc/test_task_samples.py @@ -59,13 +59,11 @@ class TaskSampleTestCase(test.TestCase): else: scenarios.update(task_config.keys()) - # TODO(boris-42): We should refactor scenarios framework add "_" to - # all non-benchmark methods.. Then this test will pass. - missing = set(scenario.Scenario.list_benchmark_scenarios()) - scenarios + missing = set(s.get_name() for s in scenario.Scenario.get_all()) + missing -= scenarios # check missing scenario is not from plugin missing = [s for s in list(missing) - if scenario.Scenario.get_by_name(s.split(".")[0]). - __module__.startswith("rally")] + if scenario.Scenario.get(s).__module__.startswith("rally")] self.assertEqual(missing, [], "These scenarios don't have samples: %s" % missing)