diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-04-03 13:47:40 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-04-03 13:49:50 -0700 |
| commit | 12d9a5a38b9968f488b26822dc082ecbc484bbe9 (patch) | |
| tree | baf05fdf1046ceb6fcf7743c0f68b155200b0135 /nova/tests | |
| parent | adb212405684c798464861f6e188db3de0f04605 (diff) | |
Make sure cloudpipe extension can retrieve network
* includes failing test
* fixes bug 972583
Change-Id: Idadac82c6a0fda8a1b912fb974e5754a1e82df39
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/openstack/compute/contrib/test_cloudpipe.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py b/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py index a2323d909..531590cb3 100644 --- a/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py +++ b/nova/tests/api/openstack/compute/contrib/test_cloudpipe.py @@ -34,7 +34,7 @@ FLAGS = flags.FLAGS def fake_vpn_instance(): return {'id': 7, 'image_ref': FLAGS.vpn_image_id, 'vm_state': 'active', 'created_at': utils.parse_strtime('1981-10-20T00:00:00.000000'), - 'uuid': 7777, 'project_id': 'fake'} + 'uuid': 7777, 'project_id': 'other'} def compute_api_get_all_empty(context): @@ -76,7 +76,7 @@ class CloudpipeTest(test.TestCase): compute_api_get_all) req = fakes.HTTPRequest.blank('/v2/fake/os-cloudpipe') res_dict = self.controller.index(req) - response = {'cloudpipes': [{'project_id': 'fake', + response = {'cloudpipes': [{'project_id': 'other', 'instance_id': 7777, 'created_at': '1981-10-20T00:00:00Z'}]} self.assertEqual(res_dict, response) @@ -84,6 +84,7 @@ class CloudpipeTest(test.TestCase): def test_cloudpipe_list(self): def network_api_get(context, network_id): + self.assertEqual(context.project_id, 'other') return {'vpn_public_address': '127.0.0.1', 'vpn_public_port': 22} @@ -99,7 +100,7 @@ class CloudpipeTest(test.TestCase): compute_api_get_all) req = fakes.HTTPRequest.blank('/v2/fake/os-cloudpipe') res_dict = self.controller.index(req) - response = {'cloudpipes': [{'project_id': 'fake', + response = {'cloudpipes': [{'project_id': 'other', 'internal_ip': '192.168.1.100', 'public_ip': '127.0.0.1', 'public_port': 22, |
