Add tests for negative selectors. (#3616)

https://github.com/prometheus/prometheus/issues/3575
This commit is contained in:
Brian Brazil 2017-12-23 14:06:37 +00:00 committed by GitHub
parent d76d5de66f
commit b418063d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -35,3 +35,25 @@ eval instant at 18000s rate(http_requests[40s]) - rate(http_requests[1m] offset
{job="api-server", instance="0", group="canary"} 5 {job="api-server", instance="0", group="canary"} 5
{job="api-server", instance="1", group="canary"} 0 {job="api-server", instance="1", group="canary"} 0
# https://github.com/prometheus/prometheus/issues/3575
eval instant at 0s http_requests{foo!="bar"}
http_requests{job="api-server", instance="0", group="production"} 0
http_requests{job="api-server", instance="1", group="production"} 0
http_requests{job="api-server", instance="0", group="canary"} 0
http_requests{job="api-server", instance="1", group="canary"} 0
eval instant at 0s http_requests{foo!="bar", job="api-server"}
http_requests{job="api-server", instance="0", group="production"} 0
http_requests{job="api-server", instance="1", group="production"} 0
http_requests{job="api-server", instance="0", group="canary"} 0
http_requests{job="api-server", instance="1", group="canary"} 0
eval instant at 0s http_requests{foo!~"bar", job="api-server"}
http_requests{job="api-server", instance="0", group="production"} 0
http_requests{job="api-server", instance="1", group="production"} 0
http_requests{job="api-server", instance="0", group="canary"} 0
http_requests{job="api-server", instance="1", group="canary"} 0
eval instant at 0s http_requests{foo!~"bar", job="api-server", instance="1", x!="y", z="", group!=""}
http_requests{job="api-server", instance="1", group="production"} 0
http_requests{job="api-server", instance="1", group="canary"} 0