From 46b89bbe48cc26d21576aa5de90ba700849984f7 Mon Sep 17 00:00:00 2001 From: kairat_kushaev Date: Tue, 28 Apr 2015 17:16:20 +0300 Subject: [PATCH] Change file loading mechanism for heat tests Improve file loading mechanism for heat tests. Previously, heat tests loaded template files for every tests. "types.set" allows to exclude redundant file operations from tests. In addition, the unit tests for heat rally-scenarios were updated and mocking of CONF.benchmark was excluded from unit-tests. Change-Id: Ibdace7bf96ff822701ee8505f1dcd232999a6fe8 --- rally-jobs/extra/default.yaml.template | 1 + rally-jobs/rally.yaml | 4 ++++ samples/tasks/scenarios/heat/create-and-delete-stack.json | 3 +++ samples/tasks/scenarios/heat/create-and-delete-stack.yaml | 2 ++ samples/tasks/scenarios/heat/create-and-list-stack.json | 3 +++ samples/tasks/scenarios/heat/create-and-list-stack.yaml | 2 ++ samples/tasks/scenarios/heat/templates/default.yaml.template | 1 + 7 files changed, 16 insertions(+) create mode 100644 rally-jobs/extra/default.yaml.template create mode 100644 samples/tasks/scenarios/heat/templates/default.yaml.template diff --git a/rally-jobs/extra/default.yaml.template b/rally-jobs/extra/default.yaml.template new file mode 100644 index 00000000..eb4f2f2d --- /dev/null +++ b/rally-jobs/extra/default.yaml.template @@ -0,0 +1 @@ +heat_template_version: 2014-10-16 \ No newline at end of file diff --git a/rally-jobs/rally.yaml b/rally-jobs/rally.yaml index 3a5c1855..3efe0a24 100755 --- a/rally-jobs/rally.yaml +++ b/rally-jobs/rally.yaml @@ -571,6 +571,8 @@ HeatStacks.create_and_list_stack: - + args: + template_path: "/home/jenkins/.rally/extra/default.yaml.template" runner: type: "constant" times: 6 @@ -585,6 +587,8 @@ HeatStacks.create_and_delete_stack: - + args: + template_path: "/home/jenkins/.rally/extra/default.yaml.template" runner: type: "constant" times: 6 diff --git a/samples/tasks/scenarios/heat/create-and-delete-stack.json b/samples/tasks/scenarios/heat/create-and-delete-stack.json index cc897ab5..0887b180 100644 --- a/samples/tasks/scenarios/heat/create-and-delete-stack.json +++ b/samples/tasks/scenarios/heat/create-and-delete-stack.json @@ -1,6 +1,9 @@ { "HeatStacks.create_and_delete_stack": [ { + "args": { + "template_path": "templates/default.yaml.template" + }, "runner": { "type": "constant", "times": 10, diff --git a/samples/tasks/scenarios/heat/create-and-delete-stack.yaml b/samples/tasks/scenarios/heat/create-and-delete-stack.yaml index f66f88d1..f6de6a9a 100644 --- a/samples/tasks/scenarios/heat/create-and-delete-stack.yaml +++ b/samples/tasks/scenarios/heat/create-and-delete-stack.yaml @@ -1,6 +1,8 @@ --- HeatStacks.create_and_delete_stack: - + args: + template_path: "templates/default.yaml.template" runner: type: "constant" times: 10 diff --git a/samples/tasks/scenarios/heat/create-and-list-stack.json b/samples/tasks/scenarios/heat/create-and-list-stack.json index a013542d..961efd52 100644 --- a/samples/tasks/scenarios/heat/create-and-list-stack.json +++ b/samples/tasks/scenarios/heat/create-and-list-stack.json @@ -1,6 +1,9 @@ { "HeatStacks.create_and_list_stack": [ { + "args": { + "template_path": "templates/default.yaml.template" + }, "runner": { "type": "constant", "times": 10, diff --git a/samples/tasks/scenarios/heat/create-and-list-stack.yaml b/samples/tasks/scenarios/heat/create-and-list-stack.yaml index 323fe915..61a1b345 100644 --- a/samples/tasks/scenarios/heat/create-and-list-stack.yaml +++ b/samples/tasks/scenarios/heat/create-and-list-stack.yaml @@ -1,6 +1,8 @@ --- HeatStacks.create_and_list_stack: - + args: + template_path: "templates/default.yaml.template" runner: type: "constant" times: 10 diff --git a/samples/tasks/scenarios/heat/templates/default.yaml.template b/samples/tasks/scenarios/heat/templates/default.yaml.template new file mode 100644 index 00000000..eb4f2f2d --- /dev/null +++ b/samples/tasks/scenarios/heat/templates/default.yaml.template @@ -0,0 +1 @@ +heat_template_version: 2014-10-16 \ No newline at end of file