summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorSandy Walsh <sandy@sandywalsh.com>2012-02-29 08:03:11 -0800
committerSandy Walsh <sandy@sandywalsh.com>2012-02-29 15:02:59 -0800
commitaff4a399ec7fc480c8359d0df40304049ff44d79 (patch)
treebf54a4cdfe633ae868c0dfa3f97f5391c262fc05 /nova/tests
parent05958d176cd9438c2fd5028256260f9f9ae9ff20 (diff)
notifications for delete, snapshot and resize
Change-Id: I67a6d190afde915551acd5bdf80ace8b666e27ef
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_compute.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py
index a034e54d0..59ec79734 100644
--- a/nova/tests/test_compute.py
+++ b/nova/tests/test_compute.py
@@ -889,7 +889,7 @@ class ComputeTestCase(BaseTestCase):
test_notifier.NOTIFICATIONS = []
self.compute.terminate_instance(self.context, inst_ref['uuid'])
- self.assertEquals(len(test_notifier.NOTIFICATIONS), 3)
+ self.assertEquals(len(test_notifier.NOTIFICATIONS), 5)
msg = test_notifier.NOTIFICATIONS[0]
self.assertEquals(msg['priority'], 'INFO')
self.assertEquals(msg['event_type'], 'compute.instance.exists')
@@ -898,6 +898,11 @@ class ComputeTestCase(BaseTestCase):
self.assertEquals(msg['priority'], 'INFO')
self.assertEquals(msg['event_type'], 'compute.instance.delete.start')
msg1 = test_notifier.NOTIFICATIONS[2]
+ self.assertEquals(msg1['event_type'],
+ 'compute.instance.shutdown.start')
+ msg1 = test_notifier.NOTIFICATIONS[3]
+ self.assertEquals(msg1['event_type'], 'compute.instance.shutdown.end')
+ msg1 = test_notifier.NOTIFICATIONS[4]
self.assertEquals(msg1['event_type'], 'compute.instance.delete.end')
payload = msg['payload']
self.assertEquals(payload['tenant_id'], self.project_id)