Rename BenchmarkEngine to TaskEngine
The reame is performed as a part of transition to the new task format. Change-Id: Ieaef03138298ef04f52a8f0da2a87b3664130ec8
This commit is contained in:
parent
fdb7953981
commit
977dc27642
@ -33,10 +33,10 @@ class TaskSampleTestCase(test.TestCase):
|
|||||||
os.pardir, os.pardir, os.pardir,
|
os.pardir, os.pardir, os.pardir,
|
||||||
"samples", "tasks")
|
"samples", "tasks")
|
||||||
|
|
||||||
@mock.patch("rally.task.engine.BenchmarkEngine"
|
@mock.patch("rally.task.engine.TaskEngine"
|
||||||
"._validate_config_semantic")
|
"._validate_config_semantic")
|
||||||
def test_schema_is_valid(self,
|
def test_schema_is_valid(self,
|
||||||
mock_benchmark_engine__validate_config_semantic):
|
mock_task_engine__validate_config_semantic):
|
||||||
scenarios = set()
|
scenarios = set()
|
||||||
|
|
||||||
for dirname, dirnames, filenames in os.walk(self.samples_path):
|
for dirname, dirnames, filenames in os.walk(self.samples_path):
|
||||||
@ -52,7 +52,7 @@ class TaskSampleTestCase(test.TestCase):
|
|||||||
try:
|
try:
|
||||||
task_config = yaml.safe_load(api.Task.render_template
|
task_config = yaml.safe_load(api.Task.render_template
|
||||||
(task_file.read()))
|
(task_file.read()))
|
||||||
eng = engine.BenchmarkEngine(task_config,
|
eng = engine.TaskEngine(task_config,
|
||||||
mock.MagicMock())
|
mock.MagicMock())
|
||||||
eng.validate()
|
eng.validate()
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@ -28,10 +28,10 @@ class RallyJobsTestCase(test.TestCase):
|
|||||||
rally_jobs_path = os.path.join(
|
rally_jobs_path = os.path.join(
|
||||||
os.path.dirname(__file__), "..", "..", "..", "rally-jobs")
|
os.path.dirname(__file__), "..", "..", "..", "rally-jobs")
|
||||||
|
|
||||||
@mock.patch("rally.task.engine.BenchmarkEngine"
|
@mock.patch("rally.task.engine.TaskEngine"
|
||||||
"._validate_config_semantic")
|
"._validate_config_semantic")
|
||||||
def test_schema_is_valid(
|
def test_schema_is_valid(
|
||||||
self, mock_benchmark_engine__validate_config_semantic):
|
self, mock_task_engine__validate_config_semantic):
|
||||||
discover.load_plugins(os.path.join(self.rally_jobs_path, "plugins"))
|
discover.load_plugins(os.path.join(self.rally_jobs_path, "plugins"))
|
||||||
|
|
||||||
for filename in ["rally.yaml", "rally-neutron.yaml",
|
for filename in ["rally.yaml", "rally-neutron.yaml",
|
||||||
@ -55,7 +55,7 @@ class RallyJobsTestCase(test.TestCase):
|
|||||||
task = api.Task.render_template(task_file.read(), **args)
|
task = api.Task.render_template(task_file.read(), **args)
|
||||||
task = yaml.safe_load(task)
|
task = yaml.safe_load(task)
|
||||||
|
|
||||||
eng = engine.BenchmarkEngine(task, mock.MagicMock())
|
eng = engine.TaskEngine(task, mock.MagicMock())
|
||||||
eng.validate()
|
eng.validate()
|
||||||
except Exception:
|
except Exception:
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
|
Loading…
Reference in New Issue
Block a user