Merge "Fix issue with failing metric tests"

This commit is contained in:
Zuul 2018-02-22 13:03:15 +00:00 committed by Gerrit Code Review
commit bde9357bde
1 changed files with 2 additions and 1 deletions

View File

@ -58,7 +58,8 @@ class TestMetrics(base.BaseMonascaTest):
self.assertEqual(200, resp.status)
elements = response_body['elements']
for element in elements:
if str(element['name']) == name:
# check if metric is there and dimension info already available
if (str(element['name']) == name and len(element['dimensions']) > 0):
self._verify_list_measurements_element(element, key, value)
measurement = element['measurements'][0]
self._verify_list_measurements_measurement(