]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests/rgw: update tests to use new host fixture 1781/head
authorAlfredo Deza <adeza@redhat.com>
Mon, 21 Aug 2017 19:43:17 +0000 (15:43 -0400)
committerAlfredo Deza <adeza@redhat.com>
Mon, 21 Aug 2017 20:50:02 +0000 (16:50 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
tests/functional/tests/rgw/test_rgw_tuning.py

index ca1ca8a15e499dc168b344b35cfe63734de12f7d..9140d23e5cdaf7572d3bacd98bdd167bf0bcded9 100644 (file)
@@ -5,24 +5,24 @@ import json
 class TestRGWs(object):
 
     @pytest.mark.no_docker
-    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")
+    def test_rgw_bucket_default_quota_is_set(self, node, host):
+        assert host.file(node["conf_path"]).contains("rgw override bucket index max shards")
+        assert host.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):
+    def test_rgw_bucket_default_quota_is_applied(self, node, host):
         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 = host.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
-    def test_rgw_tuning_pools_are_set(self, node, Command):
+    def test_rgw_tuning_pools_are_set(self, node, host):
         cmd = "sudo ceph --cluster={} --connect-timeout 5 osd dump".format(node["cluster_name"])
-        output = Command.check_output(cmd)
+        output = host.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"])
+            pg_num_str = "pg_num {pg_num}".format(pg_num=pg_num["pg_num"])
             assert pg_num_str in output