Fix bad resource schema for Volume
Change-Id: Id8faa530fc7cdd1f3fc287c033ed61aa87fd9807
This commit is contained in:
parent
d0c7a5e98e
commit
e8c0a7ed6b
|
@ -50,8 +50,8 @@ class Volume(resource.Resource):
|
|||
'Tags': {
|
||||
'Type': 'List',
|
||||
'Description': _('The list of tags to associate '
|
||||
'with the volume.')},
|
||||
'Schema': {'Type': 'Map', 'Schema': tags_schema},
|
||||
'with the volume.'),
|
||||
'Schema': {'Type': 'Map', 'Schema': tags_schema}},
|
||||
}
|
||||
|
||||
_restore_property = 'SnapshotId'
|
||||
|
|
|
@ -232,6 +232,18 @@ class VolumeTest(HeatTestCase):
|
|||
|
||||
self.m.VerifyAll()
|
||||
|
||||
def test_volume_bad_tags(self):
|
||||
t = template_format.parse(volume_template)
|
||||
t['Resources']['DataVolume']['Properties']['Tags'] = [{'Foo': 'bar'}]
|
||||
stack = utils.parse_stack(t, stack_name='test_volume_bad_tags_stack')
|
||||
|
||||
rsrc = vol.Volume('DataVolume',
|
||||
t['Resources']['DataVolume'],
|
||||
stack)
|
||||
self.assertRaises(exception.StackValidationFailed, rsrc.validate)
|
||||
|
||||
self.m.VerifyAll()
|
||||
|
||||
def test_volume_attachment_error(self):
|
||||
fv = FakeVolume('creating', 'available')
|
||||
fva = FakeVolume('attaching', 'error')
|
||||
|
|
Loading…
Reference in New Issue