Skip to content

Commit

Permalink
Merge "Remove unused code"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Sep 23, 2016
2 parents fa856ab + e53f3ed commit 3db8995
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
5 changes: 0 additions & 5 deletions nova/tests/functional/api_sample_tests/test_server_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ def _post_server_group(self):
return self._verify_response('server-groups-post-resp',
subs, response, 200)

def _create_server_group(self):
subs = self._get_create_subs()
return self._do_post('os-server-groups',
'server-groups-post-req', subs)

def test_server_groups_post(self):
return self._post_server_group()

Expand Down
23 changes: 0 additions & 23 deletions nova/tests/unit/compute/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -4061,29 +4061,6 @@ def test_run_instance_queries_macs(self, mock_mac, mock_allocate):
bind_host_id=self.compute.host)
mock_mac.assert_called_once_with(test.MatchType(instance_obj.Instance))

def _create_server_group(self, policies, instance_host):
group_instance = self._create_fake_instance_obj(
params=dict(host=instance_host))

instance_group = objects.InstanceGroup(self.context)
instance_group.user_id = self.user_id
instance_group.project_id = self.project_id
instance_group.name = 'messi'
instance_group.uuid = str(uuid.uuid4())
instance_group.members = [group_instance.uuid]
instance_group.policies = policies
fake_notifier.NOTIFICATIONS = []
instance_group.create()
self.assertEqual(1, len(fake_notifier.NOTIFICATIONS))
msg = fake_notifier.NOTIFICATIONS[0]
self.assertEqual(instance_group.name, msg.payload['name'])
self.assertEqual(instance_group.members, msg.payload['members'])
self.assertEqual(instance_group.policies, msg.payload['policies'])
self.assertEqual(instance_group.project_id, msg.payload['project_id'])
self.assertEqual(instance_group.uuid, msg.payload['uuid'])
self.assertEqual('servergroup.create', msg.event_type)
return instance_group

def test_instance_set_to_error_on_uncaught_exception(self):
# Test that instance is set to error state when exception is raised.
instance = self._create_fake_instance_obj()
Expand Down

0 comments on commit 3db8995

Please sign in to comment.