[Plugins] Remove deprecated Dummy.dummy_with_scenario_output
This workload is deprecated and actually does nothing (since return value is not processed anymore). Change-Id: If0f9c24f8237b55b999ad51874c72b48a6899e64
This commit is contained in:
parent
b6bedc5b78
commit
c65c7f7447
@ -599,16 +599,6 @@
|
|||||||
failure_rate:
|
failure_rate:
|
||||||
max: 0
|
max: 0
|
||||||
|
|
||||||
Dummy.dummy_with_scenario_output:
|
|
||||||
-
|
|
||||||
runner:
|
|
||||||
type: "constant"
|
|
||||||
times: 20
|
|
||||||
concurrency: 10
|
|
||||||
sla:
|
|
||||||
failure_rate:
|
|
||||||
max: 0
|
|
||||||
|
|
||||||
Dummy.dummy_random_fail_in_atomic:
|
Dummy.dummy_random_fail_in_atomic:
|
||||||
-
|
-
|
||||||
args:
|
args:
|
||||||
|
@ -631,16 +631,6 @@
|
|||||||
failure_rate:
|
failure_rate:
|
||||||
max: 0
|
max: 0
|
||||||
|
|
||||||
Dummy.dummy_with_scenario_output:
|
|
||||||
-
|
|
||||||
runner:
|
|
||||||
type: "constant"
|
|
||||||
times: 20
|
|
||||||
concurrency: 10
|
|
||||||
sla:
|
|
||||||
failure_rate:
|
|
||||||
max: 0
|
|
||||||
|
|
||||||
Dummy.dummy_random_fail_in_atomic:
|
Dummy.dummy_random_fail_in_atomic:
|
||||||
-
|
-
|
||||||
args:
|
args:
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
import random
|
import random
|
||||||
|
|
||||||
from rally.common.i18n import _
|
from rally.common.i18n import _
|
||||||
from rally.common import logging
|
|
||||||
from rally.common import utils
|
from rally.common import utils
|
||||||
from rally import exceptions
|
from rally import exceptions
|
||||||
from rally.task import atomic
|
from rally.task import atomic
|
||||||
@ -182,26 +181,6 @@ class DummyOutput(scenario.Scenario):
|
|||||||
"data": data})
|
"data": data})
|
||||||
|
|
||||||
|
|
||||||
@logging.log_deprecated("Use Dummy.dummy_output() instead.", "0.4.1",
|
|
||||||
once=True)
|
|
||||||
@scenario.configure(name="Dummy.dummy_with_scenario_output")
|
|
||||||
class DummyWithScenarioOutput(scenario.Scenario):
|
|
||||||
"""Dummy benchmarks for testing Rally benchmark engine."""
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
"""Return a dummy scenario output.
|
|
||||||
|
|
||||||
Dummy.dummy_with_scenario_output can be used to test the scenario
|
|
||||||
output processing.
|
|
||||||
"""
|
|
||||||
out = {
|
|
||||||
"value_1": random.randint(1, 100),
|
|
||||||
"value_2": random.random()
|
|
||||||
}
|
|
||||||
err = ""
|
|
||||||
return {"data": out, "errors": err}
|
|
||||||
|
|
||||||
|
|
||||||
@scenario.configure(name="Dummy.dummy_random_fail_in_atomic")
|
@scenario.configure(name="Dummy.dummy_random_fail_in_atomic")
|
||||||
class DummyRandomFailInAtomic(scenario.Scenario):
|
class DummyRandomFailInAtomic(scenario.Scenario):
|
||||||
"""Randomly throw exceptions in atomic actions."""
|
"""Randomly throw exceptions in atomic actions."""
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"Dummy.dummy_with_scenario_output": [
|
|
||||||
{
|
|
||||||
"runner": {
|
|
||||||
"type": "constant",
|
|
||||||
"times": 20,
|
|
||||||
"concurrency": 10
|
|
||||||
},
|
|
||||||
"context": {
|
|
||||||
"users": {
|
|
||||||
"tenants": 1,
|
|
||||||
"users_per_tenant": 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
Dummy.dummy_with_scenario_output:
|
|
||||||
-
|
|
||||||
runner:
|
|
||||||
type: "constant"
|
|
||||||
times: 20
|
|
||||||
concurrency: 10
|
|
||||||
context:
|
|
||||||
users:
|
|
||||||
tenants: 1
|
|
||||||
users_per_tenant: 1
|
|
@ -25,13 +25,6 @@ class PluginTestCase(unittest.TestCase):
|
|||||||
self.rally = utils.Rally()
|
self.rally = utils.Rally()
|
||||||
|
|
||||||
def test_show_one(self):
|
def test_show_one(self):
|
||||||
result = self.rally("plugin show Dummy.dummy_with_scenario_output")
|
|
||||||
self.assertIn("NAME", result)
|
|
||||||
self.assertIn("NAMESPACE", result)
|
|
||||||
self.assertIn("Dummy.dummy_with_scenario_output", result)
|
|
||||||
self.assertIn("MODULE", result)
|
|
||||||
|
|
||||||
def test_show_multiple_and_full_match(self):
|
|
||||||
result = self.rally("plugin show Dummy.dummy")
|
result = self.rally("plugin show Dummy.dummy")
|
||||||
self.assertIn("NAME", result)
|
self.assertIn("NAME", result)
|
||||||
self.assertIn("NAMESPACE", result)
|
self.assertIn("NAMESPACE", result)
|
||||||
@ -43,7 +36,6 @@ class PluginTestCase(unittest.TestCase):
|
|||||||
self.assertIn("Multiple plugins found:", result)
|
self.assertIn("Multiple plugins found:", result)
|
||||||
self.assertIn("Dummy.dummy", result)
|
self.assertIn("Dummy.dummy", result)
|
||||||
self.assertIn("Dummy.dummy_exception", result)
|
self.assertIn("Dummy.dummy_exception", result)
|
||||||
self.assertIn("Dummy.dummy_with_scenario_output", result)
|
|
||||||
self.assertIn("Dummy.dummy_random_fail_in_atomic", result)
|
self.assertIn("Dummy.dummy_random_fail_in_atomic", result)
|
||||||
|
|
||||||
def test_show_not_found(self):
|
def test_show_not_found(self):
|
||||||
@ -66,7 +58,6 @@ class PluginTestCase(unittest.TestCase):
|
|||||||
result = self.rally("plugin list Dummy")
|
result = self.rally("plugin list Dummy")
|
||||||
self.assertIn("Dummy.dummy", result)
|
self.assertIn("Dummy.dummy", result)
|
||||||
self.assertIn("Dummy.dummy_exception", result)
|
self.assertIn("Dummy.dummy_exception", result)
|
||||||
self.assertIn("Dummy.dummy_with_scenario_output", result)
|
|
||||||
self.assertIn("Dummy.dummy_random_fail_in_atomic", result)
|
self.assertIn("Dummy.dummy_random_fail_in_atomic", result)
|
||||||
|
|
||||||
def test_list_not_found_namespace(self):
|
def test_list_not_found_namespace(self):
|
||||||
|
@ -155,14 +155,6 @@ class DummyTestCase(test.TestCase):
|
|||||||
|
|
||||||
self.assertEqual(expected, scenario._output)
|
self.assertEqual(expected, scenario._output)
|
||||||
|
|
||||||
def test_dummy_dummy_with_scenario_output(self):
|
|
||||||
scenario = dummy.DummyWithScenarioOutput(test.get_test_context())
|
|
||||||
result = scenario.run()
|
|
||||||
self.assertEqual(result["errors"], "")
|
|
||||||
# Since the data is generated in random,
|
|
||||||
# checking for not None
|
|
||||||
self.assertIsNotNone(result["data"])
|
|
||||||
|
|
||||||
def test_dummy_random_fail_in_atomic(self):
|
def test_dummy_random_fail_in_atomic(self):
|
||||||
scenario = dummy.DummyRandomFailInAtomic(test.get_test_context())
|
scenario = dummy.DummyRandomFailInAtomic(test.get_test_context())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user