diff --git a/heat/engine/constraints.py b/heat/engine/constraints.py index 94fa96f642..a2e701b0f7 100644 --- a/heat/engine/constraints.py +++ b/heat/engine/constraints.py @@ -586,8 +586,8 @@ class BaseCustomConstraint(object): def error(self, value): if self._error_message is None: - return _("Error validating value %(value)r") % {"value": value} - return _("Error validating value %(value)r: %(message)s") % { + return _("Error validating value '%(value)s'") % {"value": value} + return _("Error validating value '%(value)s': %(message)s") % { "value": value, "message": self._error_message} def validate(self, value, context): diff --git a/heat/tests/test_sahara_templates.py b/heat/tests/test_sahara_templates.py index bc7aa422a4..4a887b85c2 100644 --- a/heat/tests/test_sahara_templates.py +++ b/heat/tests/test_sahara_templates.py @@ -216,7 +216,7 @@ class SaharaNodeGroupTemplateTest(common.HeatTestCase): ex = self.assertRaises(exception.StackValidationFailed, ngt.validate) self.assertEqual(u"Property error: " u"resources.node-group.properties.flavor: " - u"Error validating value u'm1.large'", + u"Error validating value 'm1.large'", six.text_type(ex)) def test_template_invalid_name(self): diff --git a/heat/tests/test_software_deployment.py b/heat/tests/test_software_deployment.py index 8e92adb24b..e54f2df1de 100644 --- a/heat/tests/test_software_deployment.py +++ b/heat/tests/test_software_deployment.py @@ -378,28 +378,38 @@ class SoftwareDeploymentTest(common.HeatTestCase): self.deployment.handle_create() self.assertEqual(sd['id'], self.deployment.resource_id) + call_arg = self.rpc_client.create_software_config.call_args[1] + call_arg['inputs'] = sorted( + call_arg['inputs'], key=lambda k: k['name']) self.assertEqual({ 'config': '', 'group': 'Heat::Ungrouped', 'name': self.deployment.physical_resource_name(), 'inputs': [{ - 'name': 'foo', - 'type': 'String', - 'value': 'bar' - }, { 'name': 'bink', 'type': 'String', 'value': 'bonk' + }, { + 'description': 'Name of the current action being deployed', + 'name': 'deploy_action', + 'type': 'String', + 'value': 'CREATE' + }, { + 'description': 'Name of this deployment resource in the stack', + 'name': 'deploy_resource_name', + 'type': 'String', + 'value': 'deployment_mysql' }, { 'description': 'ID of the server being deployed to', 'name': 'deploy_server_id', 'type': 'String', 'value': '9f1f0e00-05d2-4ca5-8602-95021f19c9d0' }, { - 'description': 'Name of the current action being deployed', - 'name': 'deploy_action', + 'description': ('How the server should signal to heat with ' + 'the deployment output values.'), + 'name': 'deploy_signal_transport', 'type': 'String', - 'value': 'CREATE' + 'value': 'NO_SIGNAL' }, { 'description': 'ID of the stack this deployment belongs to', 'name': 'deploy_stack_id', @@ -407,20 +417,13 @@ class SoftwareDeploymentTest(common.HeatTestCase): 'value': ('software_deployment_test_stack' '/42f6f66b-631a-44e7-8d01-e22fb54574a9') }, { - 'description': 'Name of this deployment resource in the stack', - 'name': 'deploy_resource_name', + 'name': 'foo', 'type': 'String', - 'value': 'deployment_mysql' - }, { - 'description': ('How the server should signal to heat with ' - 'the deployment output values.'), - 'name': 'deploy_signal_transport', - 'type': 'String', - 'value': 'NO_SIGNAL' + 'value': 'bar' }], 'options': None, 'outputs': None - }, self.rpc_client.create_software_config.call_args[1]) + }, call_arg) self.assertEqual( {'action': 'CREATE', diff --git a/py3-testlist b/py3-testlist index 5b388c40be..426411f18f 100644 --- a/py3-testlist +++ b/py3-testlist @@ -123,11 +123,13 @@ heat.tests.test_rpc_listener_client heat.tests.test_rpc_worker_client heat.tests.test_rsrc_defn heat.tests.test_sahara_cluster +heat.tests.test_sahara_templates heat.tests.test_scaling_template heat.tests.test_server_tags heat.tests.test_short_id heat.tests.test_software_component heat.tests.test_software_config +heat.tests.test_software_deployment heat.tests.test_stack heat.tests.test_stack_collect_attributes heat.tests.test_stack_delete