Merge "s3api: Fix types in /info"
This commit is contained in:
commit
8ac63b7609
@ -452,13 +452,15 @@ def filter_factory(global_conf, **local_conf):
|
||||
register_swift_info(
|
||||
's3api',
|
||||
# TODO: make default values as variables
|
||||
max_bucket_listing=conf.get('max_bucket_listing', 1000),
|
||||
max_parts_listing=conf.get('max_parts_listing', 1000),
|
||||
max_upload_part_num=conf.get('max_upload_part_num', 1000),
|
||||
max_multi_delete_objects=conf.get('max_multi_delete_objects', 1000),
|
||||
allow_multipart_uploads=conf.get('allow_multipart_uploads', True),
|
||||
min_segment_size=conf.get('min_segment_size', 5242880),
|
||||
s3_acl=conf.get('s3_acl', False)
|
||||
max_bucket_listing=int(conf.get('max_bucket_listing', 1000)),
|
||||
max_parts_listing=int(conf.get('max_parts_listing', 1000)),
|
||||
max_upload_part_num=int(conf.get('max_upload_part_num', 1000)),
|
||||
max_multi_delete_objects=int(
|
||||
conf.get('max_multi_delete_objects', 1000)),
|
||||
allow_multipart_uploads=config_true_value(
|
||||
conf.get('allow_multipart_uploads', True)),
|
||||
min_segment_size=int(conf.get('min_segment_size', 5242880)),
|
||||
s3_acl=config_true_value(conf.get('s3_acl', False)),
|
||||
)
|
||||
|
||||
def s3api_filter(app):
|
||||
|
@ -868,7 +868,8 @@ class TestS3ApiMiddleware(S3ApiTestCase):
|
||||
self.assertEqual(elem.find('./ResourceType').text, 'ACL')
|
||||
|
||||
def test_registered_defaults(self):
|
||||
filter_factory(self.conf)
|
||||
conf_from_file = {k: str(v) for k, v in self.conf.items()}
|
||||
filter_factory(conf_from_file)
|
||||
swift_info = utils.get_swift_info()
|
||||
self.assertTrue('s3api' in swift_info)
|
||||
self.assertEqual(swift_info['s3api'].get('max_bucket_listing'),
|
||||
|
Loading…
Reference in New Issue
Block a user