diff options
Diffstat (limited to 'nova/tests')
-rw-r--r-- | nova/tests/api/openstack/compute/plugins/v3/test_servers.py | 18 | ||||
-rw-r--r-- | nova/tests/api/openstack/compute/test_servers.py | 16 | ||||
-rw-r--r-- | nova/tests/compute/test_resource_tracker.py | 5 | ||||
-rw-r--r-- | nova/tests/db/test_migrations.py | 16 | ||||
-rw-r--r-- | nova/tests/image_fixtures.py | 21 |
5 files changed, 39 insertions, 37 deletions
diff --git a/nova/tests/api/openstack/compute/plugins/v3/test_servers.py b/nova/tests/api/openstack/compute/plugins/v3/test_servers.py index 6368cb649b..b46c37a9d2 100644 --- a/nova/tests/api/openstack/compute/plugins/v3/test_servers.py +++ b/nova/tests/api/openstack/compute/plugins/v3/test_servers.py @@ -3024,15 +3024,15 @@ class ServersAllExtensionsTestCase(test.TestCase): an exception because of a malformed request before the core API gets a chance to validate the request and return a 422 response. - For example, AccessIPsController extends servers.Controller: - - @wsgi.extends - def create(self, req, resp_obj, body): - context = req.environ['nova.context'] - if authorize(context) and 'server' in resp_obj.obj: - resp_obj.attach(xml=AccessIPTemplate()) - server = resp_obj.obj['server'] - self._extend_server(req, server) + For example, AccessIPsController extends servers.Controller:: + + | @wsgi.extends + | def create(self, req, resp_obj, body): + | context = req.environ['nova.context'] + | if authorize(context) and 'server' in resp_obj.obj: + | resp_obj.attach(xml=AccessIPTemplate()) + | server = resp_obj.obj['server'] + | self._extend_server(req, server) we want to ensure that the extension isn't barfing on an invalid body. diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py index 777c63c9ff..0edab4760a 100644 --- a/nova/tests/api/openstack/compute/test_servers.py +++ b/nova/tests/api/openstack/compute/test_servers.py @@ -4838,14 +4838,14 @@ class ServersAllExtensionsTestCase(test.TestCase): an exception because of a malformed request before the core API gets a chance to validate the request and return a 422 response. - For example, ServerDiskConfigController extends servers.Controller: - - @wsgi.extends - def create(self, req, body): - if 'server' in body: - self._set_disk_config(body['server']) - resp_obj = (yield) - self._show(req, resp_obj) + For example, ServerDiskConfigController extends servers.Controller:: + + | @wsgi.extends + | def create(self, req, body): + | if 'server' in body: + | self._set_disk_config(body['server']) + | resp_obj = (yield) + | self._show(req, resp_obj) we want to ensure that the extension isn't barfing on an invalid body. diff --git a/nova/tests/compute/test_resource_tracker.py b/nova/tests/compute/test_resource_tracker.py index 0a5a1c0653..ee284d122f 100644 --- a/nova/tests/compute/test_resource_tracker.py +++ b/nova/tests/compute/test_resource_tracker.py @@ -1077,9 +1077,10 @@ class ResizeClaimTestCase(BaseTrackerTestCase): class NoInstanceTypesInSysMetadata(ResizeClaimTestCase): """Make sure we handle the case where the following are true: - 1) Compute node C gets upgraded to code that looks for instance types in + + #) Compute node C gets upgraded to code that looks for instance types in system metadata. AND - 2) C already has instances in the process of migrating that do not have + #) C already has instances in the process of migrating that do not have stashed instance types. bug 1164110 diff --git a/nova/tests/db/test_migrations.py b/nova/tests/db/test_migrations.py index f0cf594b60..603d5fcee6 100644 --- a/nova/tests/db/test_migrations.py +++ b/nova/tests/db/test_migrations.py @@ -31,14 +31,14 @@ and 'openstack_baremetal_citest' with user 'openstack_citest' and password 'openstack_citest' on localhost. The test will then use that db and u/p combo to run the tests. -For postgres on Ubuntu this can be done with the following commands: - -sudo -u postgres psql -postgres=# create user openstack_citest with createdb login password - 'openstack_citest'; -postgres=# create database openstack_citest with owner openstack_citest; -postgres=# create database openstack_baremetal_citest with owner - openstack_citest; +For postgres on Ubuntu this can be done with the following commands:: + +| sudo -u postgres psql +| postgres=# create user openstack_citest with createdb login password +| 'openstack_citest'; +| postgres=# create database openstack_citest with owner openstack_citest; +| postgres=# create database openstack_baremetal_citest with owner +| openstack_citest; """ diff --git a/nova/tests/image_fixtures.py b/nova/tests/image_fixtures.py index 771b5e1a3f..9ab09b989a 100644 --- a/nova/tests/image_fixtures.py +++ b/nova/tests/image_fixtures.py @@ -26,16 +26,17 @@ def get_image_fixtures(): start at 123 and go to 131, with the following brief summary of image attributes: - ID Type Status Notes - ----------------------------------------------------------------- - 123 Public image active - 124 Snapshot queued - 125 Snapshot saving - 126 Snapshot active - 127 Snapshot killed - 128 Snapshot deleted - 129 Snapshot pending_delete - 130 Public image active Has no name + | ID Type Status Notes + | ---------------------------------------------------------- + | 123 Public image active + | 124 Snapshot queued + | 125 Snapshot saving + | 126 Snapshot active + | 127 Snapshot killed + | 128 Snapshot deleted + | 129 Snapshot pending_delete + | 130 Public image active Has no name + """ image_id = 123 |