Merge "Fixing nits"

This commit is contained in:
Zuul 2018-11-07 20:19:42 +00:00 committed by Gerrit Code Review
commit 0780297b63
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ establish a limit may include:
- a region (optional depending on the service)
.. NOTE:: The `default limit` of registered limit and the `resource limit` of
limit now are limited from `-1` to `2147483647` (integer). `-1` means
project limit now are limited from `-1` to `2147483647` (integer). `-1` means
no limit and `2147483647` is the max value for user to define limits.
The length of unified limit's `resource type` now is limited from `1`
to `255` (string).

View File

@ -2675,14 +2675,14 @@ class LimitValidationTestCase(unit.BaseTestCase):
{'resource_limit': 10000000000000000},
{'resource_limit': 'not_int'},
{'description': 123}]
for invalid_desc in _INVALID_FORMATS:
for invalid_attribute in _INVALID_FORMATS:
request_to_validate = [{'project_id': uuid.uuid4().hex,
'service_id': uuid.uuid4().hex,
'region_id': 'RegionOne',
'resource_name': 'volume',
'resource_limit': 10,
'description': 'test description'}]
request_to_validate[0].update(invalid_desc)
request_to_validate[0].update(invalid_attribute)
self.assertRaises(exception.SchemaValidationError,
self.create_limits_validator.validate,