Fix test_prometheus_endpoint

This commit is contained in:
vdimir 2021-12-09 20:45:54 +03:00
parent f07e14825d
commit a0488d21d2
No known key found for this signature in database
GPG Key ID: 9B404D301C0CC7EB

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)}