mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #1526 from ceph/wip-rgw-default-quota-set-testing
test: check if default bucket object quota is appliedpull/1546/head
commit
15d4f65baa
|
@ -1,12 +1,22 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
class TestRGWs(object):
|
class TestRGWs(object):
|
||||||
|
|
||||||
|
@pytest.mark.no_docker
|
||||||
def test_rgw_bucket_default_quota_is_set(self, node, File):
|
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 override bucket index max shards")
|
||||||
assert File(node["conf_path"]).contains("rgw bucket default quota max objects")
|
assert File(node["conf_path"]).contains("rgw bucket default quota max objects")
|
||||||
|
|
||||||
|
@pytest.mark.no_docker
|
||||||
|
def test_rgw_bucket_default_quota_is_applied(self, node, Command):
|
||||||
|
radosgw_admin_cmd = "sudo radosgw-admin --cluster={} user create --uid=test --display-name Test".format(node["cluster_name"])
|
||||||
|
radosgw_admin_output = Command.check_output(radosgw_admin_cmd)
|
||||||
|
radosgw_admin_output_json = json.loads(radosgw_admin_output)
|
||||||
|
assert radosgw_admin_output_json["bucket_quota"]["enabled"] == True
|
||||||
|
assert radosgw_admin_output_json["bucket_quota"]["max_objects"] == 1638400
|
||||||
|
|
||||||
@pytest.mark.no_docker
|
@pytest.mark.no_docker
|
||||||
def test_rgw_tuning_pools_are_set(self, node, Command):
|
def test_rgw_tuning_pools_are_set(self, node, Command):
|
||||||
cmd = "sudo ceph --cluster={} --connect-timeout 5 osd dump".format(node["cluster_name"])
|
cmd = "sudo ceph --cluster={} --connect-timeout 5 osd dump".format(node["cluster_name"])
|
||||||
|
|
Loading…
Reference in New Issue