Fix issue with failing metric tests

Retrieve measurement again, if returned without val f. dimension

Depends-on: https://review.openstack.org/542945
Story: 2001482
Task: 6203

Change-Id: I739612e96a2975bde12aea91f3f8dfcd6fb15342
This commit is contained in:
bandorf 2018-02-15 09:24:05 +01:00
parent e2ac3a49b7
commit 86d81ab79d
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(