diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-01-29 12:07:20 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-01-29 12:07:20 +0000 |
| commit | cc1fee34599549abc497fda662ca5cd858432698 (patch) | |
| tree | f1c143a1827c3519f5097a5a1634bc9294a76c9b /nova/tests | |
| parent | ce09c50c9253131396f713edbf11ca427341be0e (diff) | |
| parent | 9983d07d056f064da96fe46790573be7ff90677f (diff) | |
Merge "Stop including full service catalog in each RPC msg"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_context.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nova/tests/test_context.py b/nova/tests/test_context.py index 0915bf157..527534fd5 100644 --- a/nova/tests/test_context.py +++ b/nova/tests/test_context.py @@ -74,3 +74,22 @@ class ContextTestCase(test.TestCase): self.assertTrue(c) self.assertIn("'extra_arg1': 'meow'", info['log_msg']) self.assertIn("'extra_arg2': 'wuff'", info['log_msg']) + + def test_service_catalog_default(self): + ctxt = context.RequestContext('111', '222') + self.assertEquals(ctxt.service_catalog, []) + + def test_service_catalog_cinder_only(self): + service_catalog = [ + {u'type': u'compute', u'name': u'nova'}, + {u'type': u's3', u'name': u's3'}, + {u'type': u'image', u'name': u'glance'}, + {u'type': u'volume', u'name': u'cinder'}, + {u'type': u'ec2', u'name': u'ec2'}, + {u'type': u'object-store', u'name': u'swift'}, + {u'type': u'identity', u'name': u'keystone'}] + + volume_catalog = [{u'type': u'volume', u'name': u'cinder'}] + ctxt = context.RequestContext('111', '222', + service_catalog=service_catalog) + self.assertEquals(ctxt.service_catalog, volume_catalog) |
