Use InvalidConfigurationValue instead of InvalidInput
worker value is from cinder.conf, so use InvalidConfigurationValue is better. Change-Id: I51a6d3041b42e9fc97d5562e5ae586000d6db36d
This commit is contained in:
parent
916458d0a2
commit
167c5d127f
|
@ -509,7 +509,7 @@ class WSGIService(service.ServiceBase):
|
|||
"must be greater than 0.") %
|
||||
{'worker_name': worker_name,
|
||||
'workers': self.workers})
|
||||
raise exception.InvalidInput(msg)
|
||||
raise exception.InvalidConfigurationValue(msg)
|
||||
setup_profiler(name, self.host)
|
||||
|
||||
self.server = wsgi.Server(CONF,
|
||||
|
|
|
@ -532,7 +532,7 @@ class TestWSGIService(test.TestCase):
|
|||
@mock.patch('oslo_service.wsgi.Loader')
|
||||
def test_workers_set_negative_user_setting(self, mock_loader):
|
||||
self.override_config('osapi_volume_workers', -1)
|
||||
self.assertRaises(exception.InvalidInput,
|
||||
self.assertRaises(exception.InvalidConfigurationValue,
|
||||
service.WSGIService, "osapi_volume")
|
||||
self.assertTrue(mock_loader.called)
|
||||
|
||||
|
|
Loading…
Reference in New Issue