diff options
| author | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-28 09:28:18 -0700 |
|---|---|---|
| committer | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-28 09:28:18 -0700 |
| commit | 062301faf57d1e07b5068ae90c91c8c7da460e1f (patch) | |
| tree | cd10422959de1dd83e30e67b52d488eae9971799 /nova/tests | |
| parent | 8501cd94e3929918fdbfe0ca489304449f2f7fe3 (diff) | |
Start up nova-api service on an unused port if 0 is specified. Fixes bug 744150
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/integrated/integrated_helpers.py | 3 | ||||
| -rw-r--r-- | nova/tests/integrated/test_login.py | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/nova/tests/integrated/integrated_helpers.py b/nova/tests/integrated/integrated_helpers.py index cc7326e73..752563e89 100644 --- a/nova/tests/integrated/integrated_helpers.py +++ b/nova/tests/integrated/integrated_helpers.py @@ -141,6 +141,7 @@ class IntegratedUnitTestContext(object): self.api_service = api_service - self.auth_url = 'http://localhost:8774/v1.0' + host, port = api_service.get_port('osapi') + self.auth_url = 'http://%s:%s/v1.0' % (host, port) return api_service diff --git a/nova/tests/integrated/test_login.py b/nova/tests/integrated/test_login.py index 6b241f240..764f3326d 100644 --- a/nova/tests/integrated/test_login.py +++ b/nova/tests/integrated/test_login.py @@ -33,6 +33,7 @@ FLAGS.verbose = True class LoginTest(test.TestCase): def setUp(self): super(LoginTest, self).setUp() + self.flags(ec2_listen_port=0, osapi_listen_port=0) self.context = integrated_helpers.IntegratedUnitTestContext() self.user = self.context.test_user self.api = self.user.openstack_api |
