Add heat CLI test for stack-show

Change-Id: I35b17be14438e6de6fffd0396bab9989ef812a2a
This commit is contained in:
Georgy Dyuldin 2016-10-26 11:54:56 +03:00 committed by Zane Bitter
parent 79242e2e4f
commit 08a925f184
2 changed files with 12 additions and 0 deletions

View File

@ -114,3 +114,8 @@ class OpenStackClientTestBase(base.ClientTestBase):
def _stack_snapshot_restore(self, id, snapshot_id):
cmd = 'stack snapshot restore ' + id + ' ' + snapshot_id
self.openstack(cmd)
def _stack_show(self, stack_id):
cmd = 'stack show ' + stack_id
stack_raw = self.openstack(cmd)
return self.show_to_dict(stack_raw)

View File

@ -75,3 +75,10 @@ class OpenStackClientStackTest(base.OpenStackClientTestBase):
stacks_raw = self.openstack(
'stack snapshot list' + ' ' + self.stack_name)
self.assertNotIn(snapshot['id'], stacks_raw)
def test_stack_show(self):
stack = self._stack_create_minimal()
stack_info = self._stack_show(stack['id'])
stack_props = {k: v for k, v in stack_info.items()
if k in stack.keys()}
self.assertEqual(stack, stack_props)