Merge pull request #1484 from ceph/wip-rgw-testing

rgw: test functionality of conf vars and pool creation for tuning
pull/1502/head
Andrew Schoen 2017-05-05 10:56:00 -05:00 committed by GitHub
commit 0b9c6cdc9c
4 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,8 @@
copy_admin_key: true
create_pools:
foo:
pg_num: 17
bar:
pg_num: 19
rgw_override_bucket_index_max_shards: 16
rgw_bucket_default_quota_max_objects: 1638400

View File

@ -23,3 +23,5 @@ devices:
- /dev/sda
- /dev/sdb
ceph_osd_docker_run_script_path: /var/tmp
rgw_override_bucket_index_max_shards: 16
rgw_bucket_default_quota_max_objects: 1638400

View File

@ -0,0 +1,18 @@
import pytest
class TestRGWs(object):
def test_rgw_bucket_default_quota_is_set(self, node, File):
assert File(node["conf_path"]).contains("rgw override bucket index max shards")
assert File(node["conf_path"]).contains("rgw bucket default quota max objects")
@pytest.mark.no_docker
def test_rgw_tuning_pools_are_set(self, node, Command):
cmd = "sudo ceph --cluster={} --connect-timeout 5 osd dump".format(node["cluster_name"])
output = Command.check_output(cmd)
pools = node["vars"]["create_pools"]
for pool_name, pg_num in pools.items():
assert pool_name in output
pg_num_str = "pg_num {pg_num}".format(pg_num = pg_num["pg_num"])
assert pg_num_str in output

View File

@ -0,0 +1,8 @@
copy_admin_key: true
create_pools:
foo:
pg_num: 17
bar:
pg_num: 19
rgw_override_bucket_index_max_shards: 16
rgw_bucket_default_quota_max_objects: 1638400