summaryrefslogtreecommitdiff
path: root/nova/tests/unit/objects/test_instance_group.py
diff options
context:
space:
mode:
authorTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>2018-02-05 15:41:47 +0900
committerTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>2018-03-06 22:03:00 +0000
commitc4397d5e5abf627ad48c7fee85328cbd7c95b651 (patch)
tree9a3b9089ea07d05a78c9ee502741559f41d87b79 /nova/tests/unit/objects/test_instance_group.py
parent01333a7f1895583367be1437b557c60de27b5fdb (diff)
downloadnova-c4397d5e5abf627ad48c7fee85328cbd7c95b651.tar.gz
Transform servergroup.addmember notification
The servergroup.addmember notification has been transformed to the versioned notification framework. Change-Id: I5291e453ba06f0f26c4928e4f7482c40e725a781 Implements: bp versioned-notification-transformation-rocky
Diffstat (limited to 'nova/tests/unit/objects/test_instance_group.py')
-rw-r--r--nova/tests/unit/objects/test_instance_group.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/tests/unit/objects/test_instance_group.py b/nova/tests/unit/objects/test_instance_group.py
index 7bdea16389..48aa992a4e 100644
--- a/nova/tests/unit/objects/test_instance_group.py
+++ b/nova/tests/unit/objects/test_instance_group.py
@@ -207,9 +207,11 @@ class _TestInstanceGroupObject(object):
mock_notify.assert_called_once_with(self.context, "delete",
{'server_group_id': _DB_UUID})
+ @mock.patch('nova.compute.utils.notify_about_server_group_add_member')
@mock.patch('nova.compute.utils.notify_about_server_group_update')
@mock.patch('nova.objects.InstanceGroup._add_members_in_db')
- def test_add_members(self, mock_members_add_db, mock_notify):
+ def test_add_members(self, mock_members_add_db, mock_notify,
+ mock_notify_add_member):
fake_member_models = [{'instance_uuid': mock.sentinel.uuid}]
fake_member_uuids = [mock.sentinel.uuid]
mock_members_add_db.return_value = fake_member_models
@@ -225,6 +227,7 @@ class _TestInstanceGroupObject(object):
self.context, "addmember",
{'instance_uuids': fake_member_uuids,
'server_group_id': _DB_UUID})
+ mock_notify_add_member.assert_called_once_with(self.context, _DB_UUID)
@mock.patch('nova.objects.InstanceList.get_by_filters')
@mock.patch('nova.objects.InstanceGroup._get_from_db_by_uuid',