Add functinoal tests for 'openstack stack snapshot delete'

For now, there are several heat osc CLIs which do not have own functional tests
in heatclient/tests/functional/osc/v1. I think it is time to add some for heatclient.
Add functional test for 'openstack stack snapshot delete'

Change-Id: I21257b4f6126b9693256c953ed9335edad53a844
Implements: bp add-functional
This commit is contained in:
shizhihui 2016-11-14 22:45:47 +08:00
parent 505ad5ce38
commit 16b50f84da

View File

@ -66,3 +66,12 @@ class OpenStackClientStackTest(base.OpenStackClientTestBase):
self._stack_delete(stack['id'])
stacks_raw = self.openstack('stack list')
self.assertNotIn(stack['id'], stacks_raw)
def test_stack_snapshot_delete(self):
snapshot_name = utils.rand_name(name='test-stack-snapshot')
stack = self._stack_create_minimal()
snapshot = self._stack_snapshot_create(stack['id'], snapshot_name)
self._stack_snapshot_delete(stack['id'], snapshot['id'])
stacks_raw = self.openstack(
'stack snapshot list' + ' ' + self.stack_name)
self.assertNotIn(snapshot['id'], stacks_raw)