Add heat CLI test for stack-show
MODIFY
heatclient/tests/functional/osc/v1/base.py
heatclient/tests/functional/osc/v1/base.py
@@ -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)

MODIFY
heatclient/tests/functional/osc/v1/test_stack.py
heatclient/tests/functional/osc/v1/test_stack.py
@@ -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)

Add heat CLI test for stack-show

Change-Id: I35b17be14438e6de6fffd0396bab9989ef812a2a