From 55c3fcebd41b6a990ee4e0b2a4761f3bda2eb230 Mon Sep 17 00:00:00 2001 From: Yair Fried <yfried@redhat.com> Date: Sun, 17 May 2015 15:17:56 +0300 Subject: [PATCH] [Scenario] Split scenarios - P1 Move dummy under plugins/common Implements: blueprint split-plugins Change-Id: I7fdc27ca48adc2678e76e96cccdc15e5f4274287 --- .../dummy => plugins/common/scenarios}/__init__.py | 0 .../plugins/common}/scenarios/dummy/__init__.py | 0 .../{benchmark => plugins/common}/scenarios/dummy/dummy.py | 0 tests/unit/benchmark/scenarios/test_base.py | 2 +- tests/unit/cmd/commands/test_info.py | 2 +- tests/unit/plugins/common/scenarios/__init__.py | 0 tests/unit/plugins/common/scenarios/dummy/__init__.py | 0 .../common}/scenarios/dummy/test_dummy.py | 6 +++--- 8 files changed, 5 insertions(+), 5 deletions(-) rename rally/{benchmark/scenarios/dummy => plugins/common/scenarios}/__init__.py (100%) rename {tests/unit/benchmark => rally/plugins/common}/scenarios/dummy/__init__.py (100%) rename rally/{benchmark => plugins/common}/scenarios/dummy/dummy.py (100%) create mode 100644 tests/unit/plugins/common/scenarios/__init__.py create mode 100644 tests/unit/plugins/common/scenarios/dummy/__init__.py rename tests/unit/{benchmark => plugins/common}/scenarios/dummy/test_dummy.py (92%) diff --git a/rally/benchmark/scenarios/dummy/__init__.py b/rally/plugins/common/scenarios/__init__.py similarity index 100% rename from rally/benchmark/scenarios/dummy/__init__.py rename to rally/plugins/common/scenarios/__init__.py diff --git a/tests/unit/benchmark/scenarios/dummy/__init__.py b/rally/plugins/common/scenarios/dummy/__init__.py similarity index 100% rename from tests/unit/benchmark/scenarios/dummy/__init__.py rename to rally/plugins/common/scenarios/dummy/__init__.py diff --git a/rally/benchmark/scenarios/dummy/dummy.py b/rally/plugins/common/scenarios/dummy/dummy.py similarity index 100% rename from rally/benchmark/scenarios/dummy/dummy.py rename to rally/plugins/common/scenarios/dummy/dummy.py diff --git a/tests/unit/benchmark/scenarios/test_base.py b/tests/unit/benchmark/scenarios/test_base.py index cf54786421..dcf2e4b574 100644 --- a/tests/unit/benchmark/scenarios/test_base.py +++ b/tests/unit/benchmark/scenarios/test_base.py @@ -20,10 +20,10 @@ import six from rally.benchmark.context import base as base_ctx from rally.benchmark.scenarios import base -from rally.benchmark.scenarios.dummy import dummy from rally.benchmark import validation from rally import consts from rally import exceptions +from rally.plugins.common.scenarios.dummy import dummy from tests.unit import fakes from tests.unit import test diff --git a/tests/unit/cmd/commands/test_info.py b/tests/unit/cmd/commands/test_info.py index 28e5c0ae74..f3496f8fa1 100644 --- a/tests/unit/cmd/commands/test_info.py +++ b/tests/unit/cmd/commands/test_info.py @@ -16,7 +16,6 @@ import mock from rally.benchmark.scenarios import base as scenario_base -from rally.benchmark.scenarios.dummy import dummy from rally.benchmark.sla import base as sla_base from rally.cmd.commands import info from rally import deploy @@ -24,6 +23,7 @@ from rally.deploy.engines import existing as existing_cloud from rally.deploy import serverprovider from rally.deploy.serverprovider.providers import existing as existing_servers from rally import exceptions +from rally.plugins.common.scenarios.dummy import dummy from rally.plugins.common.sla import failure_rate from tests.unit import test diff --git a/tests/unit/plugins/common/scenarios/__init__.py b/tests/unit/plugins/common/scenarios/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/plugins/common/scenarios/dummy/__init__.py b/tests/unit/plugins/common/scenarios/dummy/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/benchmark/scenarios/dummy/test_dummy.py b/tests/unit/plugins/common/scenarios/dummy/test_dummy.py similarity index 92% rename from tests/unit/benchmark/scenarios/dummy/test_dummy.py rename to tests/unit/plugins/common/scenarios/dummy/test_dummy.py index 14d4cdfcd5..d67467755e 100644 --- a/tests/unit/benchmark/scenarios/dummy/test_dummy.py +++ b/tests/unit/plugins/common/scenarios/dummy/test_dummy.py @@ -13,13 +13,13 @@ import mock -from rally.benchmark.scenarios.dummy import dummy +from rally.plugins.common.scenarios.dummy import dummy from tests.unit import test class DummyTestCase(test.TestCase): - @mock.patch("rally.benchmark.scenarios.dummy.dummy.time") + @mock.patch("rally.plugins.common.scenarios.dummy.dummy.time") def test_dummy(self, mock_sleep): scenario = dummy.Dummy() scenario.sleep_between = mock.MagicMock() @@ -29,7 +29,7 @@ class DummyTestCase(test.TestCase): scenario.dummy(sleep=10) mock_sleep.sleep.assert_called_once_with(10) - @mock.patch("rally.benchmark.scenarios.dummy.dummy.time") + @mock.patch("rally.plugins.common.scenarios.dummy.dummy.time") def test_dummy_exception(self, mock_sleep): scenario = dummy.Dummy()