summaryrefslogtreecommitdiff
path: root/heatclient/tests/unit/test_utils.py
diff options
context:
space:
mode:
authorAmey Bhide <abhide@vmware.com>2015-11-05 17:54:18 -0800
committerBryan Jones <jonesbr@us.ibm.com>2016-02-12 15:22:01 +0000
commitb696c52554b54cbe4cb74c7c45195718fb56014e (patch)
tree1f22ff74e937d7ee175d3a48851b4537370c77d5 /heatclient/tests/unit/test_utils.py
parent57bb6e508ef3db61ab9f932dd4aaccd9758c3311 (diff)
downloadpython-heatclient-b696c52554b54cbe4cb74c7c45195718fb56014e.tar.gz
OpenstackClient plugin for stack delete
This change implements the 'openstack stack delete' command. Blueprint: heat-support-python-openstackclient Change-Id: I95df1390a9daee7115ccda68b261e0a76530ade4
Diffstat (limited to 'heatclient/tests/unit/test_utils.py')
-rw-r--r--heatclient/tests/unit/test_utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/heatclient/tests/unit/test_utils.py b/heatclient/tests/unit/test_utils.py
index 8237b4f..c58f788 100644
--- a/heatclient/tests/unit/test_utils.py
+++ b/heatclient/tests/unit/test_utils.py
@@ -188,6 +188,17 @@ class ShellTest(testtools.TestCase):
self.assertEqual(expected, utils.event_log_formatter(events_list))
self.assertEqual('', utils.event_log_formatter([]))
+ def test_wait_for_delete(self):
+ def status_f(id):
+ raise exc.HTTPNotFound
+
+ def bad_status_f(id):
+ return {'status': 'failed'}
+
+ self.assertTrue(utils.wait_for_delete(status_f, 123))
+ self.assertFalse(utils.wait_for_delete(status_f, 123, timeout=0))
+ self.assertFalse(utils.wait_for_delete(bad_status_f, 123))
+
class ShellTestParameterFiles(testtools.TestCase):