Merge pull request #32476 from vdimir/fix_test_prometheus_endpoint

This commit is contained in:
Vladimir C 2021-12-10 14:59:10 +03:00 committed by GitHub
commit 6b0e6dd61a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ def parse_response_line(line):
if line.startswith("#"):
return {}
match = re.match('^([a-zA-Z_:][a-zA-Z0-9_:]+)(\{.*\})? (\d)', line)
match = re.match('^([a-zA-Z_:][a-zA-Z0-9_:]+)(\{.*\})? -?(\d)', line)
assert match, line
name, _, val = match.groups()
return {name: int(val)}