Add template version for the provider template

The unittest "test_properties_type_mismatch" in
test_provider_template.py, the provider template misses the template
version, so there will be a "missing template version" exception, not
the expected "type mismatch" exception.

Closes-Bug: #1325146
Change-Id: Id836a7bd31dcbb4072743560cc1b314fc3073852
This commit is contained in:
Yaoguo Jiang 2014-05-31 03:30:00 +00:00
parent 7aa79d3430
commit a1867e1742
1 changed files with 6 additions and 2 deletions

View File

@ -327,6 +327,7 @@ class ProviderTemplateTest(HeatTestCase):
def test_properties_type_mismatch(self):
provider = {
'HeatTemplateFormatVersion': '2012-12-12',
'Parameters': {
'Foo': {'Type': 'String'},
},
@ -353,8 +354,11 @@ class ProviderTemplateTest(HeatTestCase):
{"Foo": "bar"})
temp_res = template_resource.TemplateResource('test_t_res',
definition, stack)
self.assertRaises(exception.StackValidationFailed,
temp_res.validate)
ex = self.assertRaises(exception.StackValidationFailed,
temp_res.validate)
self.assertEqual("Property Foo type mismatch between facade "
"DummyResource (Map) and provider (String)",
str(ex))
def test_boolean_type_provider(self):
provider = {