Typo fix: existant => existent
Impact: * debug log message in nova/compute/manager * Test function names * Test strings and comments Change-Id: I9be1b0ced2dfe257eef9785659f2cbe27b07ad3f
This commit is contained in:
parent
5dc0039c85
commit
e6922621b9
@ -99,7 +99,7 @@ class ConsoleProxyManager(manager.Manager):
|
||||
try:
|
||||
console = self.db.console_get(context, console_id)
|
||||
except exception.NotFound:
|
||||
LOG.debug(_('Tried to remove non-existant console '
|
||||
LOG.debug(_('Tried to remove non-existent console '
|
||||
'%(console_id)s.') %
|
||||
{'console_id': console_id})
|
||||
return
|
||||
|
@ -84,7 +84,7 @@ def return_server_by_uuid(context, server_uuid):
|
||||
'locked': False}
|
||||
|
||||
|
||||
def return_server_nonexistant(context, server_id):
|
||||
def return_server_nonexistent(context, server_id):
|
||||
raise exception.InstanceNotFound()
|
||||
|
||||
|
||||
@ -124,9 +124,9 @@ class ServerMetaDataTest(test.TestCase):
|
||||
}
|
||||
self.assertEqual(expected, res_dict)
|
||||
|
||||
def test_index_nonexistant_server(self):
|
||||
def test_index_nonexistent_server(self):
|
||||
self.stubs.Set(nova.db, 'instance_metadata_get',
|
||||
return_server_nonexistant)
|
||||
return_server_nonexistent)
|
||||
req = fakes.HTTPRequest.blank(self.url)
|
||||
self.assertRaises(webob.exc.HTTPNotFound,
|
||||
self.controller.index, req, self.url)
|
||||
@ -145,9 +145,9 @@ class ServerMetaDataTest(test.TestCase):
|
||||
expected = {'meta': {'key2': 'value2'}}
|
||||
self.assertEqual(expected, res_dict)
|
||||
|
||||
def test_show_nonexistant_server(self):
|
||||
def test_show_nonexistent_server(self):
|
||||
self.stubs.Set(nova.db, 'instance_metadata_get',
|
||||
return_server_nonexistant)
|
||||
return_server_nonexistent)
|
||||
req = fakes.HTTPRequest.blank(self.url + '/key2')
|
||||
self.assertRaises(webob.exc.HTTPNotFound,
|
||||
self.controller.show, req, self.uuid, 'key2')
|
||||
@ -170,9 +170,9 @@ class ServerMetaDataTest(test.TestCase):
|
||||
|
||||
self.assertEqual(None, res)
|
||||
|
||||
def test_delete_nonexistant_server(self):
|
||||
def test_delete_nonexistent_server(self):
|
||||
self.stubs.Set(nova.db, 'instance_get_by_uuid',
|
||||
return_server_nonexistant)
|
||||
return_server_nonexistent)
|
||||
req = fakes.HTTPRequest.blank(self.url + '/key1')
|
||||
req.method = 'DELETE'
|
||||
self.assertRaises(webob.exc.HTTPNotFound,
|
||||
@ -240,9 +240,9 @@ class ServerMetaDataTest(test.TestCase):
|
||||
self.controller.create,
|
||||
req, self.uuid, body)
|
||||
|
||||
def test_create_nonexistant_server(self):
|
||||
def test_create_nonexistent_server(self):
|
||||
self.stubs.Set(nova.db, 'instance_get_by_uuid',
|
||||
return_server_nonexistant)
|
||||
return_server_nonexistent)
|
||||
req = fakes.HTTPRequest.blank(self.url)
|
||||
req.method = 'POST'
|
||||
body = {"metadata": {"key1": "value1"}}
|
||||
@ -305,8 +305,8 @@ class ServerMetaDataTest(test.TestCase):
|
||||
self.assertRaises(webob.exc.HTTPBadRequest,
|
||||
self.controller.update_all, req, self.uuid, expected)
|
||||
|
||||
def test_update_all_nonexistant_server(self):
|
||||
self.stubs.Set(nova.db, 'instance_get', return_server_nonexistant)
|
||||
def test_update_all_nonexistent_server(self):
|
||||
self.stubs.Set(nova.db, 'instance_get', return_server_nonexistent)
|
||||
req = fakes.HTTPRequest.blank(self.url)
|
||||
req.method = 'PUT'
|
||||
req.content_type = "application/json"
|
||||
@ -328,9 +328,9 @@ class ServerMetaDataTest(test.TestCase):
|
||||
expected = {'meta': {'key1': 'value1'}}
|
||||
self.assertEqual(expected, res_dict)
|
||||
|
||||
def test_update_item_nonexistant_server(self):
|
||||
def test_update_item_nonexistent_server(self):
|
||||
self.stubs.Set(nova.db, 'instance_get_by_uuid',
|
||||
return_server_nonexistant)
|
||||
return_server_nonexistent)
|
||||
req = fakes.HTTPRequest.blank('/v1.1/fake/servers/asdf/metadata/key1')
|
||||
req.method = 'PUT'
|
||||
body = {"meta": {"key1": "value1"}}
|
||||
|
@ -410,13 +410,13 @@ class ServersControllerTest(test.TestCase):
|
||||
}
|
||||
self.assertDictMatch(res_dict, expected)
|
||||
|
||||
def test_get_server_addresses_nonexistant_network(self):
|
||||
def test_get_server_addresses_nonexistent_network(self):
|
||||
url = '/v2/fake/servers/%s/ips/network_0' % FAKE_UUID
|
||||
req = fakes.HTTPRequest.blank(url)
|
||||
self.assertRaises(webob.exc.HTTPNotFound, self.ips_controller.show,
|
||||
req, FAKE_UUID, 'network_0')
|
||||
|
||||
def test_get_server_addresses_nonexistant_server(self):
|
||||
def test_get_server_addresses_nonexistent_server(self):
|
||||
def fake_instance_get(*args, **kwargs):
|
||||
raise nova.exception.InstanceNotFound()
|
||||
|
||||
|
@ -30,7 +30,7 @@ class RootwrapTestCase(test.TestCase):
|
||||
filters.RegExpFilter("/bin/ls", "root", 'ls', '/[a-z]+'),
|
||||
filters.CommandFilter("/usr/bin/foo_bar_not_exist", "root"),
|
||||
filters.RegExpFilter("/bin/cat", "root", 'cat', '/[a-z]+'),
|
||||
filters.CommandFilter("/nonexistant/cat", "root"),
|
||||
filters.CommandFilter("/nonexistent/cat", "root"),
|
||||
filters.CommandFilter("/bin/cat", "root") # Keep this one last
|
||||
]
|
||||
|
||||
@ -85,7 +85,7 @@ class RootwrapTestCase(test.TestCase):
|
||||
# Our own PID does not match /bin/sleep, so it should fail
|
||||
self.assertFalse(f.match(usercmd) or f2.match(usercmd))
|
||||
usercmd = ['kill', 999999]
|
||||
# Nonexistant PID should fail
|
||||
# Nonexistent PID should fail
|
||||
self.assertFalse(f.match(usercmd) or f2.match(usercmd))
|
||||
usercmd = ['kill', p.pid]
|
||||
# Providing no signal should work
|
||||
|
@ -356,7 +356,7 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase):
|
||||
self.connection.resume(instance_ref)
|
||||
|
||||
@catch_notimplementederror
|
||||
def test_destroy_instance_nonexistant(self):
|
||||
def test_destroy_instance_nonexistent(self):
|
||||
fake_instance = {'id': 42, 'name': 'I just made this up!',
|
||||
'uuid': 'bda5fb9e-b347-40e8-8256-42397848cb00'}
|
||||
network_info = test_utils.get_test_network_info()
|
||||
|
@ -60,7 +60,7 @@ class VolumeTypeTestCase(test.TestCase):
|
||||
|
||||
for k, v in self.vol_type1_specs.iteritems():
|
||||
self.assertEqual(v, new['extra_specs'][k],
|
||||
'one of fields doesnt match')
|
||||
'one of fields does not match')
|
||||
|
||||
new_all_vtypes = volume_types.get_all_types(self.ctxt)
|
||||
self.assertEqual(len(prev_all_vtypes) + 1,
|
||||
@ -80,7 +80,7 @@ class VolumeTypeTestCase(test.TestCase):
|
||||
vol_types = volume_types.get_all_types(self.ctxt)
|
||||
self.assertEqual(total_volume_types, len(vol_types))
|
||||
|
||||
def test_non_existant_vol_type_shouldnt_delete(self):
|
||||
def test_non_existent_vol_type_shouldnt_delete(self):
|
||||
"""Ensures that volume type creation fails with invalid args"""
|
||||
self.assertRaises(exception.VolumeTypeNotFoundByName,
|
||||
volume_types.destroy, self.ctxt, "sfsfsdfdfs")
|
||||
|
@ -65,7 +65,7 @@ document_root = /tmp
|
||||
self.assertRaises(
|
||||
nova.exception.PasteAppNotFound,
|
||||
self.loader.load_app,
|
||||
"non-existant app",
|
||||
"nonexistent app",
|
||||
)
|
||||
|
||||
def test_app_found(self):
|
||||
|
Loading…
Reference in New Issue
Block a user