From 1c3dae4a90816ac6503967779b7fd77ff84900b5 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 22 Jun 2018 11:20:33 +0200 Subject: [PATCH] tests: skip rgw_tuning_pools_are_set when rgw_create_pools is not defined since ooo_collocation scenario is supposed to be the same scenario than the one tested by OSP and they are not passing `rgw_create_pools` the test `test_docker_rgw_tuning_pools_are_set` will fail: ``` > pools = node["vars"]["rgw_create_pools"] E KeyError: 'rgw_create_pools' ``` skipping this test if `node["vars"]["rgw_create_pools"]` is not defined fixes this failure. Signed-off-by: Guillaume Abrioux --- tests/functional/tests/rgw/test_rgw_tuning.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/functional/tests/rgw/test_rgw_tuning.py b/tests/functional/tests/rgw/test_rgw_tuning.py index b54b82e3f..ff42cf954 100644 --- a/tests/functional/tests/rgw/test_rgw_tuning.py +++ b/tests/functional/tests/rgw/test_rgw_tuning.py @@ -42,7 +42,9 @@ class TestRGWs(object): cluster=cluster ) output = host.check_output(cmd) - pools = node["vars"]["rgw_create_pools"] + pools = node["vars"].get("rgw_create_pools") + if pools == None: + pytest.skip('rgw_create_pools not defined, nothing to test') 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"])